[JBossWS] - Re: Cannot find port in wsdl (need help)
by ram_kumar
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
17 years, 5 months
[JBossWS] - Error accessing Web service
by Mehdi.b
Hello !
I'm french, so excuse my possible langage faults ! :)
I created an EJB 3 session bean and deployed it as a web service. Everything looks working great. I've tried it in a Web Service Explorer.
This is my WSDL
| ?
| <definitions name="HelloBeanService" targetNamespace="http://ws.cdam.clemessy.com/jaws">
| ?
| <types>
| ?
| <schema elementFormDefault="qualified" targetNamespace="http://ws.cdam.clemessy.com/jaws">
| ?
| <complexType name="hello">
| ?
| <sequence>
| <element name="String_1" nillable="true" type="string"/>
| </sequence>
| </complexType>
| ?
| <complexType name="helloResponse">
| ?
| <sequence>
| <element name="result" nillable="true" type="string"/>
| </sequence>
| </complexType>
| <element name="hello" type="tns:hello"/>
| <element name="helloResponse" type="tns:helloResponse"/>
| </schema>
| </types>
| ?
| <message name="HelloBean_helloResponse">
| <part element="tns:helloResponse" name="result"/>
| </message>
| ?
| <message name="HelloBean_hello">
| <part element="tns:hello" name="parameters"/>
| </message>
| ?
| <portType name="HelloBean">
| ?
| <operation name="hello">
| <input message="tns:HelloBean_hello"/>
| <output message="tns:HelloBean_helloResponse"/>
| </operation>
| </portType>
| ?
| <binding name="HelloBeanBinding" type="tns:HelloBean">
| <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
| ?
| <operation name="hello">
| <soap:operation soapAction=""/>
| ?
| <input>
| <soap:body use="literal"/>
| </input>
| ?
| <output>
| <soap:body use="literal"/>
| </output>
| </operation>
| </binding>
| ?
| <service name="HelloBeanService">
| ?
| <port binding="tns:HelloBeanBinding" name="HelloBeanPort">
| <soap:address location="http://bureau:8080/EJBWS2/HelloBean"/>
| </port>
| </service>
| </definitions>
|
The problem comes with the client, here is the code
| URL wsdlLocation;
|
| try {
|
| wsdlLocation = new URL("http://bureau:8080/EJBWS2/HelloBean?wsdl");
| QName serviceNameQ = new QName( "http://ws.cdam.clemessy.com/jaws", "HelloBeanService");
|
| // dynamic service usage
| Service service = Service.create(wsdlLocation, serviceNameQ);
|
| //String namespace = "http://ws.cdam.clemessy.com/jaws";
| //String portName = "HelloBeanPort";
| //QName portQN = new QName(namespace, portName);
|
| //HelloBean proxy = service.getPort(portQN, HelloBean.class);
| HelloBean proxy = service.getPort(HelloBean.class);
| //HelloBean proxy = service.getPort(serviceNameQ,HelloBean.class);
|
| /*
| Iterator<QName> itPort = service.getPorts(); // Iterate trough the ports
| while (itPort.hasNext()) { // For each port in WSDL
| QName port = itPort.next();
| System.out.println("port : "+port);
| HelloBean proxy = service.getPort(port,HelloBean.class);
| }*/
|
|
|
| } catch (MalformedURLException ex) {
| ex.printStackTrace();
| }
|
and i have the following error
| Exception in thread "main" No corresponding port found for the service interface com.clemessy.cdam.ws.HelloBean in http://bureau:8080/EJBWS2/HelloBean?wsdl
| at com.sun.xml.ws.client.ServiceContextBuilder.processAnnotations(ServiceContextBuilder.java:110)
| at com.sun.xml.ws.client.ServiceContextBuilder.completeServiceContext(ServiceContextBuilder.java:85)
| at com.sun.xml.ws.client.WSServiceDelegate.processServiceContext(WSServiceDelegate.java:114)
| at com.sun.xml.ws.client.WSServiceDelegate.createEndpointIFBaseProxy(WSServiceDelegate.java:266)
| at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:162)
| at javax.xml.ws.Service.getPort(Service.java:120)
| at clientejbws2.Main.main(Main.java:48)
|
If someone has a solution, I would be grateful !
Thanks in advance.
Best regards.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060102#4060102
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060102
17 years, 5 months
[JBossWS] - Deploying CrimePortalBeans on jboss 4.0.5.GA
by robsie
Hi,
I've got the example "CrimePortalBeans" of jboss training course.
This example runs on jboss 4.0.3_SP1 without problems. Unfortunatly on jboss 4.0.5.GA the example doesn't work.
Following messages occur after deploying (server: default):
19:49:04,842 INFO [EjbModule] Deploying OrganizationBean
| 19:49:04,862 WARN [PortComponentMetaData] <wsdl-port> element in webservices.xml not namespace qualified: OrganizationEndpointPort
| 19:49:04,892 WARN [JSR109ServerMetaDataBuilder] Adding wsdl targetNamespace to: {http://crimeportal/ws4ee}OrganizationEndpointPort
| 19:49:04,892 WARN [JSR109ServerMetaDataBuilder] Cannot obtain SEI mapping for: crimeportal.ws.OrganizationEndpoint
| 19:49:04,932 INFO [TomcatDeployer] deploy, ctxPath=/CrimePortalBeans, warUrl=.../tmp/deploy/CrimePortalBeans.jar-ws12861.war/
| 19:49:05,082 INFO [ProxyFactory] Bound EJB Home 'OrganizationBean' to jndi 'ejb/OrganizationBean'
| 19:49:05,082 INFO [EJBDeployer] Deployed: file:/D:/dev/jboss/jboss-4.0.5.GA/server/default/deploy/CrimePortalBeans.jar
| 19:49:05,132 INFO [WSDLFilePublisher] WSDL published to: file:/D:/dev/jboss/jboss-4.0.5.GA/server/default/data/wsdl/CrimePortalBeans.jar/OrganizationServiceEJB
| .wsdl
| 19:49:05,142 WARN [SchemaBindingBuilder] Global element not found in schema: {http://crimeportal/ws4ee}in0
| 19:49:05,142 WARN [SchemaBindingBuilder] Cannot obtain type binding for: {http://crimeportal/ws4ee}in0
| 19:49:05,142 WARN [SchemaBindingBuilder] Global element not found in schema: {http://crimeportal/ws4ee}getContactInfoReturn
| 19:49:05,142 WARN [SchemaBindingBuilder] Cannot obtain type binding for: {http://crimeportal/ws4ee}getContactInfoReturn
After trying to call "getContactInfo" by the client, I've got following stacktrace:
19:52:16,697 INFO [PortComponentHandler] init: [class=crimeportal.handler.PortComponentHandler,headers=[{http://crimeportal/ws4ee}handler-test],config={param1
| value1}]
| 19:52:16,697 ERROR [SOAPFaultExceptionHelper] SOAP request exception
| javax.xml.rpc.soap.SOAPFaultException: Endpoint {http://crimeportal/ws4ee}OrganizationEndpointPort does not contain operation meta data for: getContactInfo
| at org.jboss.ws.server.ServiceEndpointInvoker.getDispatchDestination(ServiceEndpointInvoker.java:181)
| at org.jboss.ws.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:107)
| at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:209)
| at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
| at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
Thanks for your help
Robert
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4060099#4060099
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4060099
17 years, 5 months