6 Replies Latest reply on Oct 1, 2008 10:34 PM by Rishabh Chandra

    Cannot find port in wsdl (need help)

    paata lominadze Master

      hi all,
      am trying to resolve this problem for a week,
      could anybody help me please ?

      i download jbossws 1.2.1GA
      there is example and i am trying to run it.

      1.EndpointInterface

      import java.rmi.Remote;
      import java.rmi.RemoteException;
      
      import javax.jws.WebService;
      import javax.jws.soap.SOAPBinding;
      import javax.jws.soap.SOAPBinding.Style;
      
      /**
       * Test the JSR-181 annotation: javax.jws.WebService
       * This interface is only used in the client deployment.
       *
       * @author Thomas.Diesler@jboss.org
       * @since 29-Apr-2005
       */
      @WebService
      @SOAPBinding(style = Style.RPC)
      public interface EndpointInterface extends Remote
      {
       String echo(String input) throws RemoteException;
      }
      


      2. EJB3RemoteInterface
      import java.rmi.RemoteException;
      
      public interface EJB3RemoteInterface extends EndpointInterface{
       String echo(String input) throws RemoteException;
      }
      


      3. EJB3Bean02
      import java.rmi.RemoteException;
      
      import javax.ejb.Remote;
      import javax.ejb.Stateless;
      import javax.jws.WebMethod;
      import javax.jws.WebService;
      import javax.jws.soap.SOAPBinding;
      
      import org.jboss.annotation.ejb.RemoteBinding;
      import org.jboss.ws.annotation.WebContext;
      
      /**
       * Test the JSR-181 javax.jws.WebService annotation on an EJB3 endpoint.
       *
       * Uses the wsdlLocation attribute.
       *
       * @author Thomas.Diesler@jboss.org
       * @since 29-Apr-2005
       */
      @WebService(
       endpointInterface="mypackage.EndpointInterface",
       portName = "EJB3RemoteInterfacePort",
       name = "mypackage.EndpointInterface",
       targetNamespace = "http://org.jboss.ws/samples/jsr181ejb",
       serviceName = "EJB3Bean02",
       wsdlLocation = "WEB-INF/wsdl/EJB3Bean02.wsdl")
      
      @WebContext(contextRoot = "/jaxws-samples-webservice02-ejb3", urlPattern = "/*")
      @SOAPBinding(style = SOAPBinding.Style.RPC)
      @Remote(EJB3RemoteInterface.class)
      @RemoteBinding(jndiBinding = "/ejb3/EJB3EndpointInterface")
      @Stateless
      public class EJB3Bean02 implements EJB3RemoteInterface {
      
       @WebMethod
       public String echo(String input)throws RemoteException {
       System.out.println("Reseive = " + input);
       return input + " - Reseived";
       }
      }
      


      after this i tryed to generate wsdl from this class and i got files like this:

      1.EJB3Bean02.wsdl

      <?xml version="1.0" encoding="UTF-8"?>
      <definitions name='EJB3Bean02' targetNamespace='urn:mypackage' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/' xmlns:tns='urn:mypackage' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
       <types/>
       <message name='EJB3RemoteInterface_echo'>
       <part name='String_1' type='xsd:string'/>
       </message>
       <message name='EJB3RemoteInterface_echoResponse'>
       <part name='result' type='xsd:string'/>
       </message>
       <portType name='EJB3RemoteInterface'>
       <operation name='echo' parameterOrder='String_1'>
       <input message='tns:EJB3RemoteInterface_echo'/>
       <output message='tns:EJB3RemoteInterface_echoResponse'/>
       </operation>
       </portType>
       <binding name='EJB3RemoteInterfaceBinding' type='tns:EJB3RemoteInterface'>
       <soap:binding style='rpc' transport='http://schemas.xmlsoap.org/soap/http'/>
       <operation name='echo'>
       <soap:operation soapAction=''/>
       <input>
       <soap:body namespace='urn:mypackage' use='literal'/>
       </input>
       <output>
       <soap:body namespace='urn:mypackage' use='literal'/>
       </output>
       </operation>
       </binding>
       <service name='EJB3Bean02'>
       <port binding='tns:EJB3RemoteInterfaceBinding' name='EJB3RemoteInterfacePort'>
       <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
       </port>
       </service>
      </definitions>
      

      2.jaxrpc-mapping.xml
      <?xml version='1.0' encoding='UTF-8'?><java-wsdl-mapping version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd'>
       <package-mapping>
       <package-type>mypackage</package-type>
       <namespaceURI>urn:mypackage.types</namespaceURI>
       </package-mapping>
       <service-interface-mapping>
       <service-interface>mypackage.EJB3Bean02</service-interface>
       <wsdl-service-name xmlns:serviceNS='urn:mypackage'>serviceNS:EJB3Bean02</wsdl-service-name>
       <port-mapping>
       <port-name>EJB3RemoteInterfacePort</port-name>
       <java-port-name>EJB3RemoteInterfacePort</java-port-name>
       </port-mapping>
       </service-interface-mapping>
       <service-endpoint-interface-mapping>
       <service-endpoint-interface>mypackage.EJB3RemoteInterface</service-endpoint-interface>
       <wsdl-port-type xmlns:portTypeNS='urn:mypackage'>portTypeNS:EJB3RemoteInterface</wsdl-port-type>
       <wsdl-binding xmlns:bindingNS='urn:mypackage'>bindingNS:EJB3RemoteInterfaceBinding</wsdl-binding>
       <service-endpoint-method-mapping>
       <java-method-name>echo</java-method-name>
       <wsdl-operation>echo</wsdl-operation>
       <method-param-parts-mapping>
       <param-position>0</param-position>
       <param-type>java.lang.String</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS='urn:mypackage'>wsdlMsgNS:EJB3RemoteInterface_echo</wsdl-message>
       <wsdl-message-part-name>String_1</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       <wsdl-return-value-mapping>
       <method-return-value>java.lang.String</method-return-value>
       <wsdl-message xmlns:wsdlMsgNS='urn:mypackage'>wsdlMsgNS:EJB3RemoteInterface_echoResponse</wsdl-message>
       <wsdl-message-part-name>result</wsdl-message-part-name>
       </wsdl-return-value-mapping>
       </service-endpoint-method-mapping>
       </service-endpoint-interface-mapping>
      </java-wsdl-mapping>
      


      3.web.xml
      <?xml version="1.0" encoding="UTF-8"?>
      <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee">
       <servlet>
       <servlet-name>/ejb3/EJB3EndpointInterface</servlet-name>
       <servlet-class>mypackage.EJB3Bean02</servlet-class>
       </servlet>
       <servlet-mapping>
       <servlet-name>/ejb3/EJB3EndpointInterface</servlet-name>
       <url-pattern>/*</url-pattern>
       </servlet-mapping>
      </web-app>
      

      4.webservices.xml
      <webservices version='1.1' xmlns='http://java.sun.com/xml/ns/j2ee' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:schemaLocation='http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd'>
       <webservice-description>
       <webservice-description-name>EJB3Bean02</webservice-description-name>
       <wsdl-file>META-INF/wsdl/EJB3Bean02.wsdl</wsdl-file>
       <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
       <port-component>
       <port-component-name>EJB3RemoteInterfacePort</port-component-name>
       <wsdl-port xmlns:portNS='urn:mypackage'>portNS:EJB3RemoteInterfacePort</wsdl-port>
       <service-endpoint-interface>mypackage.EJB3RemoteInterface</service-endpoint-interface>
       <service-impl-bean>
       <ejb-link>/ejb3/EJB3EndpointInterface</ejb-link>
       </service-impl-bean>
       </port-component>
       </webservice-description>
      </webservices>
      


      after all when i tried to deploy this project i got an error :
      13:23:22,998 INFO [Ejb3Deployment] EJB3 deployment time took: 19
      13:23:23,426 ERROR [ServiceEndpointDeployer] Cannot create service endpoint
      org.jboss.ws.WSException: Cannot find port in wsdl: {http://org.jboss.ws/samples/jsr181ejb}EJB3RemoteInterfacePort
       at org.jboss.ws.metadata.builder.MetaDataBuilder.replaceAddressLocation(MetaDataBuilder.java:378)
       at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.buildWebServiceMetaData(JAXWSWebServiceMetaDataBuilder.java:170)
       at org.jboss.ws.metadata.builder.jaxws.JAXWSServerMetaDataBuilder.setupProviderOrWebService(JAXWSServerMetaDataBuilder.java:49)
       at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderEJB3.buildMetaData(JAXWSMetaDataBuilderEJB3.java:77)
       at org.jboss.ws.core.server.ServiceEndpointDeployer.create(ServiceEndpointDeployer.java:92)
       at org.jboss.ws.integration.jboss42.DeployerInterceptor.createServiceEndpoint(DeployerInterceptor.java:127)
       at org.jboss.ws.integration.jboss42.DeployerInterceptorEJB.createServiceEndpoint(DeployerInterceptorEJB.java:43)
       at org.jboss.ws.integration.jboss42.DeployerInterceptor.create(DeployerInterceptor.java:78)
       at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
       at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy44.create(Unknown Source)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
       at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy6.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
      13:23:23,427 ERROR [ServiceEndpointPublisher] Cannot obtain waURL for: WSTest.jar
      13:23:23,427 ERROR [MainDeployer] Could not create deployment: file:/export/home/jboss/jboss-4.0.4.GA/server/all/deploy/WSTest.jar
      org.jboss.deployment.DeploymentException: Cannot create service endpoint; - nested throwable: (org.jboss.ws.WSException: Cannot find port in wsdl: {http://org.jboss.ws/samples/jsr181ejb}EJB3RemoteInterfacePort)
       at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53)
       at org.jboss.ws.integration.jboss42.DeployerInterceptor.create(DeployerInterceptor.java:83)
       at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
       at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy44.create(Unknown Source)
       at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
       at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
       at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
       at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
       at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
       at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
       at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
       at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
       at $Proxy6.deploy(Unknown Source)
       at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
       at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
       at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
      Caused by: org.jboss.ws.WSException: Cannot find port in wsdl: {http://org.jboss.ws/samples/jsr181ejb}EJB3RemoteInterfacePort
       at org.jboss.ws.metadata.builder.MetaDataBuilder.replaceAddressLocation(MetaDataBuilder.java:378)
       at org.jboss.ws.metadata.builder.jaxws.JAXWSWebServiceMetaDataBuilder.buildWebServiceMetaData(JAXWSWebServiceMetaDataBuilder.java:170)
       at org.jboss.ws.metadata.builder.jaxws.JAXWSServerMetaDataBuilder.setupProviderOrWebService(JAXWSServerMetaDataBuilder.java:49)
       at org.jboss.ws.metadata.builder.jaxws.JAXWSMetaDataBuilderEJB3.buildMetaData(JAXWSMetaDataBuilderEJB3.java:77)
       at org.jboss.ws.core.server.ServiceEndpointDeployer.create(ServiceEndpointDeployer.java:92)
       at org.jboss.ws.integration.jboss42.DeployerInterceptor.createServiceEndpoint(DeployerInterceptor.java:127)
       at org.jboss.ws.integration.jboss42.DeployerInterceptorEJB.createServiceEndpoint(DeployerInterceptorEJB.java:43)
       at org.jboss.ws.integration.jboss42.DeployerInterceptor.create(DeployerInterceptor.java:78)
       ... 28 more
      
      



      can anybody help me, what i did incorrect ???


      Regards,
      Paata


        • 1. Re: Cannot find port in wsdl (need help)
          ram kumar Newbie

          Hi,

          I also get the similar error in the deployment of a service in the JBoss 4.0.4 GA. We are using Jbpm bpel1.1beta3. During the deployment process we get the following error.

          org.jboss.ws.WSException: Cannot find port in wsdl: {http://abc.com/ws-bp/batchproduct}BatchproductPT
           at org.jboss.ws.metadata.JSR109ServerMetaDataBuilder.buildMetaData(JSR109ServerMetaDataBuilder.java:141)
           at org.jboss.ws.server.WebServiceDeployerJSE.createWebServicesMetaData(WebServiceDeployerJSE.java:189)
           at org.jboss.ws.server.WebServiceDeployer.create(WebServiceDeployer.java:103)
           at org.jboss.ws.server.WebServiceDeployerJSE.create(WebServiceDeployerJSE.java:66)
           at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.create(SubDeployerInterceptorSupport.java:180)
           at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:91)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
           at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
           at $Proxy31.create(Unknown Source)
           at org.jboss.deployment.MainDeployer.create(MainDeployer.java:953)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:807)
           at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:771)
           at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source)
           at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
           at java.lang.reflect.Method.invoke(Method.java:585)
           at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
           at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
           at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
           at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
           at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
           at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
           at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
           at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
           at $Proxy8.deploy(Unknown Source)
           at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
           at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:610)
           at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
           at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
           at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
          




          The webservices.xml is given below,
          <?xml version="1.0" encoding="UTF-8"?>
          <webservices version="1.1" xmlns="http://java.sun.com/xml/ns/j2ee"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:tns="http://blwb.abc.com/getGlobalService"
           xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
           http://java.sun.com/xml/ns/j2ee/j2ee_web_services_1_1.xsd">
          
           <webservice-description>
          
           <webservice-description-name>
           Batch Product Process
           </webservice-description-name>
           <wsdl-file>WEB-INF/wsdl/batchproduct-service.wsdl</wsdl-file>
           <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
          
           <port-component>
          
           <port-component-name>BatchproductPT</port-component-name>
           <wsdl-port xmlns:portNS="http://abc.com/ws-bp/batchproduct">
           portNS:BatchproductPT
           </wsdl-port>
           <service-endpoint-interface>
           org.jbpm.bpel.tutorial.batchproduct.BatchproductPT
           </service-endpoint-interface>
           <service-impl-bean>
           <servlet-link>batchproductServlet</servlet-link>
           </service-impl-bean>
          
           <handler>
           <handler-name>batchproductHandler</handler-name>
           <handler-class>
           org.jbpm.bpel.integration.server.SoapHandler
           </handler-class>
           <init-param>
           <param-name>partnerLinkHandle</param-name>
           <param-value>batchproduct</param-value>
           </init-param>
           </handler>
          
           </port-component>
          
           <port-component>
          
           <port-component-name>FileReadPortType</port-component-name>
           <!--wsdl-port xmlns:portNS=" http://acme.com/ws-bp/purchase"-->
           <wsdl-port xmlns:portNS="http://10.239.30.180:8080/esb/jbi/filereadservice/">
           portNS:FileReadPortType
           </wsdl-port>
           <service-endpoint-interface>
           com.abc.blwb.BestLinkage.FileReadService
           </service-endpoint-interface>
           <service-impl-bean>
           <servlet-link>filereadServlet</servlet-link>
           </service-impl-bean>
          
           <handler>
           <handler-name>filereadHandler</handler-name>
           <handler-class>
           org.jbpm.bpel.integration.server.SoapHandler
           </handler-class>
           <init-param>
           <param-name>partnerLinkHandle</param-name>
           <param-value>fileread</param-value>
           </init-param>
           </handler>
          
           </port-component>
          
          
           </webservice-description>
          
          </webservices>
          


          The batchproduct.wsdl generated is given below,
          <?xml version="1.0" encoding="UTF-8"?>
          <ns0:definitions targetNamespace="http://abc.com/wsdl/batchproduct" xmlns:ns0="http://schemas.xmlsoap.org/wsdl/" xmlns:pos="http://abc.com/wsdl/batchproduct" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:plt2="http://schemas.xmlsoap.org/ws/2004/03/partner-link/">
           <ns0:message name="fileReadRequestMessage">
           <ns0:part name="getDunsDocumentRequest" type="xsd:anySimpleType"/>
           </ns0:message>
           <ns0:message name="batchProductRequestMessage">
           <ns0:part name="BatchProductRequest" type="xsd:anySimpleType"/>
           </ns0:message>
           <ns0:portType name="FileReadPortType">
           <ns0:operation name="getDunsDocument">
           <ns0:input message="pos:fileReadRequestMessage"/>
           </ns0:operation>
           </ns0:portType>
           <ns0:portType name="BatchproductPT">
           <ns0:operation name="sendprocess">
           <ns0:input message="pos:batchProductRequestMessage"/>
           </ns0:operation>
           </ns0:portType>
           <plt2:partnerLinkType name="batchproductLT">
           <plt2:role name="BatchproductService" portType="pos:BatchproductPT"/>
           </plt2:partnerLinkType>
           <plt2:partnerLinkType name="filereadLT">
           <plt2:role name="FileReadService" portType="pos:FileReadPortType"/>
           </plt2:partnerLinkType>
          </ns0:definitions>
          


          The batchproduct-binding-1.wsdl generated is as follows,

          <?xml version="1.0" encoding="UTF-8"?>
          <definitions targetNamespace="http://abc.com/wsdl/batchproduct" xmlns:tns="http://abc.com/wsdl/batchproduct" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/">
           <import namespace="http://abc.com/wsdl/batchproduct" location="batchproduct.wsdl"/>
           <binding name="BatchproductPTBinding" type="tns:BatchproductPT">
           <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
           <operation name="sendprocess">
           <soap:operation soapAction="http://abc.com/wsdl/sendprocess"/>
           <input>
           <soap:body use="literal" namespace="http://abc.com/wsdl/batchproduct"/>
           </input>
           </operation>
           </binding>
          </definitions>
          


          The batchproduct-service.wsdl is given below,

          <?xml version="1.0" encoding="UTF-8"?>
          <definitions targetNamespace="http://abc.com/ws-bp/batchproduct" xmlns:tns="http://abc.com/ws-bp/batchproduct" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:bindingNS2="http://abc.com/wsdl/batchproduct" xmlns="http://schemas.xmlsoap.org/wsdl/">
           <import namespace="http://abc.com/wsdl/batchproduct" location="batchproduct-binding-1.wsdl"/>
           <service name="batchproductService">
           <port name="BatchproductServicePort" binding="bindingNS2:BatchproductPTBinding">
           <soap:address location="REPLACE_WITH_ACTUAL_URI"/>
           </port>
           </service>
          </definitions>
          


          The jaxrpc-mapping.xml generated is given below.

          <?xml version="1.0" encoding="UTF-8"?>
          <java-wsdl-mapping xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
           <package-mapping>
           <package-type>org.jbpm.bpel.tutorial.batchproduct</package-type>
           <namespaceURI>http://abc.com/ws-bp/batchproduct</namespaceURI>
           </package-mapping>
           <package-mapping>
           <package-type>org.jbpm.bpel.tutorial.batchproduct</package-type>
           <namespaceURI>http://abc.com/wsdl/batchproduct</namespaceURI>
           </package-mapping>
           <service-interface-mapping>
           <service-interface>org.jbpm.bpel.tutorial.batchproduct.BatchproductService</service-interface>
           <wsdl-service-name xmlns:serviceNS="http://abc.com/ws-bp/batchproduct">serviceNS:batchproductService</wsdl-service-name>
           <port-mapping>
           <port-name>BatchproductServicePort</port-name>
           <java-port-name>BatchproductServicePort</java-port-name>
           </port-mapping>
           </service-interface-mapping>
           <service-endpoint-interface-mapping>
           <service-endpoint-interface>org.jbpm.bpel.tutorial.batchproduct.BatchproductPT</service-endpoint-interface>
           <wsdl-port-type xmlns:portTypeNS="http://abc.com/wsdl/batchproduct">portTypeNS:BatchproductPT</wsdl-port-type>
           <wsdl-binding xmlns:bindingNS="http://abc.com/wsdl/batchproduct">bindingNS:BatchproductPTBinding</wsdl-binding>
           <service-endpoint-method-mapping>
           <java-method-name>sendprocess</java-method-name>
           <wsdl-operation>sendprocess</wsdl-operation>
           <method-param-parts-mapping>
           <param-position>0</param-position>
           <param-type>java.lang.String</param-type>
           <wsdl-message-mapping>
           <wsdl-message xmlns:wsdlMsgNS="http://abc.com/wsdl/batchproduct">wsdlMsgNS:batchProductRequestMessage</wsdl-message>
           <wsdl-message-part-name>BatchProductRequest</wsdl-message-part-name>
           <parameter-mode>IN</parameter-mode>
           </wsdl-message-mapping>
           </method-param-parts-mapping>
           </service-endpoint-method-mapping>
           </service-endpoint-interface-mapping>
          </java-wsdl-mapping>
          


          And finally the bpel file written,
           <process name="batchproduct"
           targetNamespace="http://abc.com/ws-bp/batchproduct"
           xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
           xmlns:lns="http://abc.com/wsdl/batchproduct">
           <partnerLinks>
           <partnerLink name="batchproduct" partnerLinkType="lns:batchproductLT"
           myRole="BatchproductService" />
          
           <partnerLink name="fileread" partnerLinkType="lns:filereadLT"
           partnerRole="FileReadService" />
           </partnerLinks>
          
           <!-- Variables are declared here-->
          
           <variables>
          
           <variable name="BatchProductRequest" messageType="lns:batchProductRequestMessage" />
           <variable name="getDunsDocumentRequest" messageType="lns:fileReadRequestMessage" />
          
           </variables>
          
          
           <sequence>
          
           <receive partnerLink="batchproduct" portType="lns:BatchproductPT"
           operation="sendprocess" variable="BatchProductRequest" />
          
           <flow>
           <sequence>
           <invoke partnerLink="fileread" portType="lns:FileReadPortType"
           operation="getDunsDocument" inputVariable="getDunsDocumentRequest">
           </invoke>
          </sequence>
          </flow>
          
           </sequence>
          </process>
          


          Could anyone please help us in fixing this as soon as possible ?

          Thanks & Regards,
          Ram Kumar


          • 2. Re: Cannot find port in wsdl (need help)
            Aldo Lezza Newbie

            Hi,
            I'm having the same problem and I've just found out that a solution is in thw webservices.xml file.

            But I'm sorry to say that I don't know how to make it works.

            I hope I was helpful. Bye

            • 3. Re: Cannot find port in wsdl (need help)
              Anis Ben Mahmoud Newbie

              Hi all,

              I have the same problem but I didn't found how to resolve it.
              Could someone help me ????

              • 4. Re: Cannot find port in wsdl (need help)
                Aldo Lezza Newbie

                Hi,
                this tool has something wrong.
                However (notice that I changed project) after running the

                ant generate-artifacts

                command I had the same problem.

                The solution was that wsdl includes are not recursive so if you use some namespace and the WSDL in which that namespace is declared is not EXPLICITLY included, than the information it looks for are not available.

                I hope it works for you too.

                Bye

                • 5. Re: Cannot find port in wsdl (need help)
                  Thomas Diesler Master

                  Why would you have webservices.xml + jaxrpc-mapping.xml (both of which are JAX-RPC artifacts) if you use a JAX-WS endpoint?

                  http://jbws.dyndns.org/mediawiki/index.php?title=JAX-WS_User_Guide#EJB3_Stateless_Session_Bean_.28SLSB.29

                  • 6. Re: Cannot find port in wsdl (need help)
                    Rishabh Chandra Newbie

                    hi all,
                    this problem happens if u dont specify the name space in your WS implementation OR if u have specified the name space but its not the same as wsdl.

                    I ahve had this issue in JbossWS 423 which is jax-ws and fixed it by having the same name space in the WSDL and WS implementation.