I have created a Dynamic Web Project using Eclipse IDE, and the exposed web service method is given below, ie.CallPaySecure().
I want to know how to create a soap service which will accept soap-header as below.
<?xml version="1.0" encoding="utf-8"?> <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"> <soap:Header> <RequestorCredentials xmlns="https://paysecure/merchant.soap.header/"> <Version>string</Version> <UserCredentials> <UserID>string</UserID> <Password>string</Password> </UserCredentials> </RequestorCredentials> </soap:Header> <soap:Body> <CallPaySecure xmlns="https://paysecure/merchant.soap/"> <strCommand>string</strCommand> <strXML>string</strXML> </CallPaySecure> </soap:Body> </soap:Envelope> I have written the following code in java
@WebMethod
@WebResult(name="CallPaySecureResult")
public String CallPaySecure( @WebParam(name="strCommand")String strCmd, @WebParam(name="strXML") String strXML ){ } But this code can only get value from the following tags.
<strCommand>string</strCommand> <strXML>string</strXML> 1.My WSDL is auto generated by the Glassfish server v4, how can I modify the WSDL or what java code should I use to accept the above mentioned XML SOAP request?
2.How to define the <soap:Header> in the WSDL, so that I can access the values that comes in <Version>,<UserID> and <Password> in my web service CallPaySecure()?
I am using SOAP for the first time.
Thanks for the suggestions.

