2

I have wsdl in which multiple port names and binding are defined, like below:

<wsdl:service name="NPCWebService">
    <wsdl:port name="NPCWebServiceHttpEndpoint" binding="xsd:NPCWebServiceHttpBinding">
      <http:address location="http://localhost:8080/axis2/services/NPCWebService"/>
    </wsdl:port>
    <wsdl:port name="NPCWebServiceHttpSoap12Endpoint" binding="xsd:NPCWebServiceSoap12Binding">
      <soap12:address location="http://localhost:8080/axis2/services/NPCWebService"/>
    </wsdl:port>
    <wsdl:port name="NPCWebServiceHttpSoap11Endpoint" binding="xsd:NPCWebServiceSoap11Binding">
      <soap:address location="http://localhost:8080/axis2/services/NPCWebService"/>
    </wsdl:port>
  </wsdl:service>

Using wsconsume i generated the stubs. When developing webservice by implementing the generating interface, what should be the portName attribute to be given, as part of @WebService annotation, since the wsdl has 3 values.

And moreover whichever portName i give out of 3, I am getting "cannot find port.." exception while deploying the war.

exception:

12:43:32,609 ERROR [MainDeployer] Could not start deployment: file:/C:/jboss-4.2
.2.GA/server/default/deploy/JbossWS.war
org.jboss.ws.WSException: Cannot find port in wsdl: {http://jbossws.np.hp.com/}N
PCWebServiceHttpSoap11Endpoint

Pls help with your viewpoints on this.

Thanks

jmj
  • 237,923
  • 42
  • 401
  • 438
user309281
  • 3,025
  • 2
  • 18
  • 18

1 Answers1

2

I had the same error : make sure the declared namespace in your WSDL is the same as your implementation (here your implementation is in com.hp.np.jbossws, as specified by the error)

Valentin Rocher
  • 11,667
  • 45
  • 59