Description
I'm writing a client for a web service that uses both request and response header data in each operation. WSDLToJava nicely generates an output parameter for the response header data but misses to do the same for the request header data.
So instead of:
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
@WebMethod(action = "http://www.gepir.org/GetPartyByGTIN", operationName = "GetPartyByGTIN")
public void getPartyByGTIN(
@WebParam(targetNamespace = "http://www.gepir.org/", partName = "partyGtin", name = "GetPartyByGTIN")
org.gepir.GetPartyByGTIN partyGtin,
@WebParam(targetNamespace = "http://www.gepir.org/", header = true, partName = "gepirRequestHeader", name = "gepirRequestHeader")
org.gepir.GepirRequestHeader gepirRequestHeader,
@WebParam(targetNamespace = "http://www.gepir.org/", mode = Mode.OUT, partName = "GetPartyByGTINResult", name = "gepirParty")
javax.xml.ws.Holder<org.gepir.GepirParty> getPartyByGTINResult,
@WebParam(targetNamespace = "http://www.gepir.org/", header = true, mode = Mode.OUT, partName = "gepirResponseHeader", name = "gepirResponseHeader")
javax.xml.ws.Holder<org.gepir.GepirResponseHeader> gepirResponseHeader
);
it just generates (the second parameter is missing):
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
@WebMethod(action = "http://www.gepir.org/GetPartyByGTIN", operationName = "GetPartyByGTIN")
public void getPartyByGTIN(
@WebParam(targetNamespace = "http://www.gepir.org/", partName = "partyGtin", name = "GetPartyByGTIN")
org.gepir.GetPartyByGTIN partyGtin,
@WebParam(targetNamespace = "http://www.gepir.org/", mode = Mode.OUT, partName = "GetPartyByGTINResult", name = "gepirParty")
javax.xml.ws.Holder<org.gepir.GepirParty> getPartyByGTINResult,
@WebParam(targetNamespace = "http://www.gepir.org/", header = true, mode = Mode.OUT, partName = "gepirResponseHeader", name = "gepirResponseHeader")
javax.xml.ws.Holder<org.gepir.GepirResponseHeader> gepirResponseHeader
);
This applies to all operations/methods.
I've added the missing parameter manually for the moment. Then the client nicely works.
The WSDL file can be found at http://gepir.gs1.ch/v3/router.asmx?wsdl. But you have to delete the routetHttpGet and routerHttpPost ports and bindings before using it. They don't seem to be valid.
Attachments
Attachments
Issue Links
- is related to
-
CXF-1020 WSDL2Java tool error: failed to generate codes with twoHeadersSameNameDifferentNamespace
-
- Closed
-