[jboss-user] [JBossWS] - Re: Cannot find port in wsdl (need help)

ram_kumar do-not-reply at jboss.com
Wed Jul 4 01:48:32 EDT 2007


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


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060236#4060236

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060236



More information about the jboss-user mailing list