user309281
user309281

Reputation: 3055

Jboss ws wsdl issue

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

Upvotes: 2

Views: 1832

Answers (1)

Valentin Rocher
Valentin Rocher

Reputation: 11669

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)

Upvotes: 2

Related Questions