Can we change the <soap:address location> dynamically - with JAX-WS - spring

I am new to soap web services,wanted to know can we change the location of soap:address according to the environment it is deployed. I am using jaxws-spring
<binding name="HelloWorldWSPortBinding" type="tns:HelloWorldWS">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<operation name="getHelloWorld"></binding>
<service name="HelloWorldWSService">
<port name="HelloWorldWSPort" binding="tns:HelloWorldWSPortBinding">
<soap:address location="http://localhost:8095/WebServicesExample/hello" />
</port>
</service>
</definitions>

Related

Oracle APEX and WSDL service

I have a simple Java class deployed on WebLogic 12c as an application.
Application Express 5.0.3.00.03.
package wsdltest;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
#WebService
public class Class1 {
public Class1() {
super();
}
#WebMethod
public String getA(#WebParam(name = "arg0") String a) {
return a;
}
}
wsdl
<!--
Published by JAX-WS RI (http://jax-ws.java.net). RI's version is JAX-WS RI 2.3.0-b170407.2038 svn-revision#2eaca54d17a59d265c6fe886b7fd0027836c766c.
-->
<!--
Generated by JAX-WS RI (http://jax-ws.java.net). RI's version is JAX-WS RI 2.3.0-b170407.2038 svn-revision#2eaca54d17a59d265c6fe886b7fd0027836c766c.
-->
<definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://wsdltest/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://wsdltest/" name="Class1Service">
<types>
<xsd:schema>
<xsd:import namespace="http://wsdltest/" schemaLocation="http://172.28.36.23:7001/Raznosti-WSDLTest-context-root/Class1Port?xsd=1"/>
</xsd:schema>
</types>
<message name="getA">
<part name="parameters" element="tns:getA"/>
</message>
<message name="getAResponse">
<part name="parameters" element="tns:getAResponse"/>
</message>
<portType name="Class1">
<operation name="getA">
<input wsam:Action="http://wsdltest/Class1/getARequest" message="tns:getA"/>
<output wsam:Action="http://wsdltest/Class1/getAResponse" message="tns:getAResponse"/>
</operation>
</portType>
<binding name="Class1PortBinding" type="tns:Class1">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="getA">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="Class1Service">
<port name="Class1Port" binding="tns:Class1PortBinding">
<soap:address location="http://172.28.36.23:7001/Raznosti-WSDLTest-context-root/Class1Port"/>
</port>
</service>
</definitions>
I've created APEX WebService Reference (based on WSDL file) via Wizard. URL was parsed, input/output parameters was found.
I've created Form on Web service too. Input/output fields, submit button, process - all were created by Wizard, no manual work. But on every submit form I get error ns0:ClientCannot find dispatch method for {}arg0. I can successfully test this web service from JDeveloper. I can create Manual type of WebService Reference with direct configure of all params, including SOAP Envelop etc and its works.
Why standard made-by-wizard web service based on correct (as I suppose) WSDL doesn't work?

Failed to parse WSDL during deploying app on jboss - maybe Woodstox

I've a problem during deploying application on jboss. I found some information that changing version of woodstox might help, but it wasn't...
Log:
16:58:09,079 INFO [stdout] (MSC service thread 1-2) [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] Failed to parse WSDL
16:58:09,080 INFO [stdout] (MSC service thread 1-2) javax.wsdl.WSDLException: WSDLException: faultCode=PARSER_ERROR: java.lang.RuntimeException: Cannot create a secure XMLInputFactory
16:58:09,080 INFO [stdout] (MSC service thread 1-2) at org.apache.cxf.wsdl11.WSDLManagerImpl.loadDefinition(WSDLManagerImpl.java:257)
16:58:09,104 INFO [stdout] (MSC service thread 1-2) Caused by: java.lang.RuntimeException: Cannot create a secure XMLInputFactory
16:58:09,104 INFO [stdout] (MSC service thread 1-2) at org.apache.cxf.staxutils.StaxUtils.createXMLInputFactory(StaxUtils.java:312)
16:58:09,514 ERROR [org.springframework.web.context.ContextLoader] (MSC service thread 1-2) Context initialization failed: org.apache.camel.FailedToCreateProducerException: Failed to create Producer for endpoint: Endpoint[cxf://bean:adapter.NotificationService?dataFormat=PAYLOAD]. Reason: org.apache.cxf.service.factory.ServiceConstructionException: No valid WSDL classpath:/interface/adapter/notification-service/v10/NotificationService.wsdl nor service class is specified.
at org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:409) [camel-core-2.12.3.jar:2.12.3]
at org.apache.camel.impl.ProducerCache.acquireProducer(ProducerCache.java:123) [camel-core-2.12.3.jar:2.12.3]
I've absolutely no idea what else can i check... My environment:
svn 1.7.9 (r1462340) Apache Maven 3.1.1
(0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 Maven home:
Java version: 1.7.0_45, vendor: Oracle Corporation OS name: "linux",
version: "3.11.0-12-generic", arch: "amd64", family: "unix" javac
1.7.0_45 java version "1.7.0_45" Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Woodstox inside jboss: 4.1.1 (I was changing it to 4.2.1 and 4.2.0)
My wsdl definition:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions name="NotificationService"
targetNamespace="http://service/NotificationService/v10"
xmlns:tns="http://service/NotificationService/v10"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:types>
<xs:schema
targetNamespace="http://service/NotificationService/v10">
<xs:include schemaLocation="NotificationService.xsd" />
</xs:schema>
</wsdl:types>
<!-- notifyPaymentStatus message-->
<wsdl:message name="notifyPaymentStatusParameters">
<wsdl:part name="notifyPaymentStatusPart" element="tns:notifyPaymentStatusRQ">
</wsdl:part>
</wsdl:message>
<wsdl:message name="notifyPaymentStatusResult">
<wsdl:part name="notifyPaymentStatusPart" element="tns:notifyPaymentStatusRS">
</wsdl:part>
</wsdl:message>
<!-- notifyError message-->
<wsdl:message name="notifyErrorParameters">
<wsdl:part name="notifyErrorPart" element="tns:notifyErrorRQ">
</wsdl:part>
</wsdl:message>
<wsdl:message name="notifyErrorResult">
<wsdl:part name="notifyErrorPart" element="tns:notifyErrorRS">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="NotificationService">
<wsdl:operation name="notifyPaymentStatus">
<wsdl:input name="notifyPaymentStatusParameters" message="tns:notifyPaymentStatusParameters" />
<wsdl:output name="notifyPaymentStatusResult" message="tns:notifyPaymentStatusResult" />
</wsdl:operation>
<wsdl:operation name="notifyError">
<wsdl:input name="notifyErrorParameters" message="tns:notifyErrorParameters" />
<wsdl:output name="notifyErrorResult" message="tns:notifyErrorResult" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="NotificationServiceBinding" type="tns:NotificationService">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="notifyPaymentStatus">
<soap:operation soapAction="" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="notifyError">
<soap:operation soapAction="" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="NotificationService">
<wsdl:port name="NotificationServicePort" binding="tns:NotificationServiceBinding">
<soap:address location="http://www.example.org/" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
and endpoint:
<cxf:cxfEndpoint id="adapter.NotificationService"
endpointName="s:NotificationServicePort" serviceName="s:NotificationService"
wsdlURL="classpath:/interface/adapter/notification-service/v10/NotificationService.wsdl"
xmlns:s="http://service/NotificationService/v10">
<cxf:properties>
<entry key="schema-validation-enabled"
value="true" />
</cxf:properties>
<cxf:inInterceptors>
<ref bean="logInInterceptor" />
</cxf:inInterceptors>
<cxf:inFaultInterceptors>
<ref bean="logInInterceptor" />
</cxf:inFaultInterceptors>
<cxf:outInterceptors>
<ref bean="logOutInterceptor" />
</cxf:outInterceptors>
<cxf:outFaultInterceptors>
<ref bean="logOutInterceptor" />
</cxf:outFaultInterceptors>
</cxf:cxfEndpoint>
When i was debugging i found some property, which is called:
org.apache.cxf.stax.allowInsecureParser. How can I set it on true? In these case probably I won't have any problems with parsing wsdl.
this one workaround works fine for me:
<bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetObject">
<bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="targetClass" value="java.lang.System" />
<property name="targetMethod" value="getProperties" />
</bean>
</property>
<property name="targetMethod" value="putAll" />
<property name="arguments">
<util:properties>
<prop key="org.apache.cxf.stax.allowInsecureParser">true</prop>
</util:properties>
</property>
</bean>
from :
CXF 2.7.x Woodstox Compatibility via Maven
I found that in my dependencies I've correct lib: 4-2-0, but I don't know why jboss is using another lib from somewhere... In my opinion better sollution would be to set on jboss to not overwrite libraries. In another case I'm still getting warning like this:
2014-06-27 12:59:58,932 WARN (MSC service thread 1-16) [org.apache.cxf.staxutils.StaxUtils] Could not create a secure Stax XMLInputFactory. Found class com.ctc.wstx.stax.WstxInputFactory. Suggest Woodstox 4.2.0 or newer.

Using WSO2 ESB PassThrough Proxy on WebLogic (Spring) Web Service

I have tried PassThroughu proxy tutorials and all works with build in example where Target Web Service is deployed on Axis (Apache CFX). Source and Proxy Web Service nicely gets tested using "TryIt" on WSO2 ESB.
Now different story - I try to achieve the same using very simple Weblogic Spring Web Service (i don't believe usage of Spring and bottom-up approach and annotations matter). It's deployed on the WebLogic server (running on the same host as WSO2 ESB). No any special WS-* extension included. It's almost hello world web service. I can easily test test it SoapUi, UniversalTestClient (WebLogic) and see WSDL in browser.
Regarding generated proxy PassThrough Web Service (followed same steps from tutorial) I can also see generated WSDL:
http://localhost:8280/services/WebServiceAServicePassThroughProxy?wsdl
However neither SoapUI nor TryIt work and both return FaultString:
The endpoint reference (EPR) for the Operation not found is /services/WebServiceAServicePassThroughProxy.WebServiceAServicePassThroughProxyHttpSoap11Endpoint and the WSA Action = . If this EPR was previously reachable, please contact the server administrator.
Here is function I used for testing "findContactById":
<body>
<p:findContactById xmlns:p="http://webservicea.testtoold.xx.yy.zz.eu/">
<!--Exactly 1 occurrence-->
<arg0>1</arg0>
</p:findContactById>
</body>
which operates on Proxy Web Service. I tried all endpoints that were generated in proxy web service, error is same as above unless if I try httpEndpoint from drop down:
http://localhost:8280/services/WebServiceAServicePassThroughProxy.WebServiceAServicePassThroughProxyHttpEndpoint
then I get Unsupported Media Type as TryItProxyError.
Anyone please help, I am getting nuts with this... should be simple, not the nightmare. Searched all web i saw few similar questions with no answers.
WebLogic Service WSDL:
<?xml version='1.0' encoding='UTF-8'?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.8-b13937 svn-revision#13942. --><!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.2.8-b13937 svn-revision#13942. --><definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://webservicea.testtoold.xx.yy.zz.eu/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://webservicea.testtoold.xx.yy.zz.eu/" name="WebServiceAService">
<types>
<xsd:schema>
<xsd:import namespace="http://webservicea.testtoold.xx.yy.zz.eu/" schemaLocation="http://localhost:7001/TestToolD/WebServiceAService?xsd=1"/>
</xsd:schema>
</types>
<message name="findContactById">
<part name="parameters" element="tns:findContactById"/>
</message>
<message name="findContactByIdResponse">
<part name="parameters" element="tns:findContactByIdResponse"/>
</message>
<message name="Exception">
<part name="fault" element="tns:Exception"/>
</message>
<message name="findAllContacts">
<part name="parameters" element="tns:findAllContacts"/>
</message>
<message name="findAllContactsResponse">
<part name="parameters" element="tns:findAllContactsResponse"/>
</message>
<portType name="WebServiceA">
<operation name="findContactById">
<input wsam:Action="http://webservicea.testtoold.xx.yy.zz.eu/WebServiceA/findContactByIdRequest" message="tns:findContactById"/>
<output wsam:Action="http://webservicea.testtoold.xx.yy.zz.eu/WebServiceA/findContactByIdResponse" message="tns:findContactByIdResponse"/>
<fault message="tns:Exception" name="Exception" wsam:Action="http://webservicea.testtoold.xx.yy.zz.eu/WebServiceA/findContactById/Fault/Exception"/>
</operation>
<operation name="findAllContacts">
<input wsam:Action="http://webservicea.testtoold.xx.yy.zz.eu/WebServiceA/findAllContactsRequest" message="tns:findAllContacts"/>
<output wsam:Action="http://webservicea.testtoold.xx.yy.zz.eu/WebServiceA/findAllContactsResponse" message="tns:findAllContactsResponse"/>
<fault message="tns:Exception" name="Exception" wsam:Action="http://webservicea.testtoold.xx.yy.zz.eu/WebServiceA/findAllContacts/Fault/Exception"/>
</operation>
</portType>
<binding name="WebServiceAPortBinding" type="tns:WebServiceA">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="findContactById">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
<fault name="Exception">
<soap:fault name="Exception" use="literal"/>
</fault>
</operation>
<operation name="findAllContacts">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
<fault name="Exception">
<soap:fault name="Exception" use="literal"/>
</fault>
</operation>
</binding>
<service name="WebServiceAService">
<port name="WebServiceAPort" binding="tns:WebServiceAPortBinding">
<soap:address location="http://localhost:7001/TestToolD/WebServiceAService"/>
</port>
</service>
</definitions>
WSO ESB Generated PassThroughProxy.wsdl
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:tns="http://webservicea.testtoold.xx.yy.zz.eu/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" targetNamespace="http://webservicea.testtoold.xx.yy.zz.eu/">
<wsdl:types>
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="unqualified">
<xsd:import namespace="http://webservicea.testtoold.xx.yy.zz.eu/" schemaLocation="WebServiceAServicePassThroughProxy?xsd=http://localhost:7001/TestToolD/WebServiceAService?xsd=1.xsd"></xsd:import>
</xsd:schema>
</wsdl:types>
<wsdl:message name="findContactById">
<wsdl:part name="parameters" element="tns:findContactById"></wsdl:part>
</wsdl:message>
<wsdl:message name="findContactByIdResponse">
<wsdl:part name="parameters" element="tns:findContactByIdResponse"></wsdl:part>
</wsdl:message>
<wsdl:message name="findAllContacts">
<wsdl:part name="parameters" element="tns:findAllContacts"></wsdl:part>
</wsdl:message>
<wsdl:message name="findAllContactsResponse">
<wsdl:part name="parameters" element="tns:findAllContactsResponse"></wsdl:part>
</wsdl:message>
<wsdl:portType name="WebServiceAServicePassThroughProxyPortType">
<wsdl:operation name="findContactById">
<wsdl:input message="tns:findContactById"></wsdl:input>
<wsdl:output message="tns:findContactByIdResponse" wsaw:Action="http://webservicea.testtoold.xx.yy.zz.eu/WebServiceA/findContactByIdResponse"></wsdl:output>
<wsdl:fault message="tns:Exception" name="Exception" wsaw:Action="http://webservicea.testtoold.xx.yy.zz.eu/WebServiceA/findContactById/Fault/Exception"></wsdl:fault>
</wsdl:operation>
<wsdl:operation name="findAllContacts">
<wsdl:input message="tns:findAllContacts"></wsdl:input>
<wsdl:output message="tns:findAllContactsResponse" wsaw:Action="http://webservicea.testtoold.xx.yy.zz.eu/WebServiceA/findAllContactsResponse"></wsdl:output>
<wsdl:fault message="tns:Exception" name="Exception" wsaw:Action="http://webservicea.testtoold.xx.yy.zz.eu/WebServiceA/findAllContacts/Fault/Exception"></wsdl:fault>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="WebServiceAServicePassThroughProxySoap11Binding" type="tns:WebServiceAServicePassThroughProxyPortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"></soap:binding>
<wsdl:operation name="findContactById">
<soap:operation soapAction="" style="document"></soap:operation>
<wsdl:input>
<soap:body use="literal"></soap:body>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"></soap:body>
</wsdl:output>
<wsdl:fault name="Exception">
<soap:fault use="literal" name="Exception"></soap:fault>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="findAllContacts">
<soap:operation soapAction="" style="document"></soap:operation>
<wsdl:input>
<soap:body use="literal"></soap:body>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"></soap:body>
</wsdl:output>
<wsdl:fault name="Exception">
<soap:fault use="literal" name="Exception"></soap:fault>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="WebServiceAServicePassThroughProxySoap12Binding" type="tns:WebServiceAServicePassThroughProxyPortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"></soap12:binding>
<wsdl:operation name="findContactById">
<soap12:operation soapAction="" style="document"></soap12:operation>
<wsdl:input>
<soap12:body use="literal"></soap12:body>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"></soap12:body>
</wsdl:output>
<wsdl:fault name="Exception">
<soap12:fault use="literal" name="Exception"></soap12:fault>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="findAllContacts">
<soap12:operation soapAction="" style="document"></soap12:operation>
<wsdl:input>
<soap12:body use="literal"></soap12:body>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"></soap12:body>
</wsdl:output>
<wsdl:fault name="Exception">
<soap12:fault use="literal" name="Exception"></soap12:fault>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="WebServiceAServicePassThroughProxyHttpBinding" type="tns:WebServiceAServicePassThroughProxyPortType">
<http:binding verb="POST"></http:binding>
<wsdl:operation name="findContactById">
<http:operation location="findContactById"></http:operation>
<wsdl:input>
<mime:content type="text/xml" part="parameters"></mime:content>
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" part="parameters"></mime:content>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="findAllContacts">
<http:operation location="findAllContacts"></http:operation>
<wsdl:input>
<mime:content type="text/xml" part="parameters"></mime:content>
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml" part="parameters"></mime:content>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="WebServiceAServicePassThroughProxy">
<wsdl:port name="WebServiceAServicePassThroughProxyHttpsSoap11Endpoint" binding="tns:WebServiceAServicePassThroughProxySoap11Binding">
<soap:address location="https://supercomputer:8243/services/WebServiceAServicePassThroughProxy.WebServiceAServicePassThroughProxyHttpsSoap11Endpoint"></soap:address>
</wsdl:port>
<wsdl:port name="WebServiceAServicePassThroughProxyHttpSoap11Endpoint" binding="tns:WebServiceAServicePassThroughProxySoap11Binding">
<soap:address location="http://supercomputer:8280/services/WebServiceAServicePassThroughProxy.WebServiceAServicePassThroughProxyHttpSoap11Endpoint"></soap:address>
</wsdl:port>
<wsdl:port name="WebServiceAServicePassThroughProxyHttpSoap12Endpoint" binding="tns:WebServiceAServicePassThroughProxySoap12Binding">
<soap12:address location="http://supercomputer:8280/services/WebServiceAServicePassThroughProxy.WebServiceAServicePassThroughProxyHttpSoap12Endpoint"></soap12:address>
</wsdl:port>
<wsdl:port name="WebServiceAServicePassThroughProxyHttpsSoap12Endpoint" binding="tns:WebServiceAServicePassThroughProxySoap12Binding">
<soap12:address location="https://supercomputer:8243/services/WebServiceAServicePassThroughProxy.WebServiceAServicePassThroughProxyHttpsSoap12Endpoint"></soap12:address>
</wsdl:port>
<wsdl:port name="WebServiceAServicePassThroughProxyHttpsEndpoint" binding="tns:WebServiceAServicePassThroughProxyHttpBinding">
<http:address location="https://supercomputer:8243/services/WebServiceAServicePassThroughProxy.WebServiceAServicePassThroughProxyHttpsEndpoint"></http:address>
</wsdl:port>
<wsdl:port name="WebServiceAServicePassThroughProxyHttpEndpoint" binding="tns:WebServiceAServicePassThroughProxyHttpBinding">
<http:address location="http://supercomputer:8280/services/WebServiceAServicePassThroughProxy.WebServiceAServicePassThroughProxyHttpEndpoint"></http:address>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
Few minor remarks:
differences in localhost and supercomputer can't be the cause - tutorials work well with such diffs
i tried lots of things (creating endpoint in registry, or locally, providing WSDL or not when creating proxy, etc etc, but I always get the identical error).
i have cut out 30% lines of code to simplify WSDL (save and delete functions) to reach allowed size of post.
tried adding action names but no difference (kept example without them)
Since ESB 4.6, pass-through transport is enabled by default : The message body is not build so, SOAP Body based dispatching is not supported (can't use the first child node of SOAP body element to determine the operation).
The error in this case is The endpoint reference (EPR) for the Operation not found is...
In your case, you can't use SOAPAction (it's blank), but you can :
append the operation name to the endpoint URL
Or, since ESB 4.8 :
add this parameter in the proxy conf : <parameter name="disableOperationValidation" locked="false">true</parameter>
modify axis2.xml conf in repository/conf/axis2 replacing
<handler class="org.apache.axis2.dispatchers.SOAPMessageBodyBasedDispatcher" name="SOAPMessageBodyBasedDispatcher"/>
with
<handler class="org.apache.synapse.core.axis2.SynapseSOAPMessageBodyBasedDispatcher" name="SOAPMessageBodyBasedDispatcher"/>

WSO2 EBS- WSDL Proxy- 2 Ports

We want to create a WSDL proxy on WSO2 ESB. The WSDL has 2 ports defined, each port defines its own
operations.
The problem is when I create the WSDL proxy and specify one of the port, the operation associated with that port is not exposed, rather the operation associated with port 2 is exposed... looks like no matter which port I point to, the operation exposed doesnt change..
My question is how can i make this work, or multiple ports in WSDL is not supported by WSO2 ESB ?
......
<wsdl:portType name="IxxxxService">
<wsdl:operation name="xxxRecordEntry">
<wsdl:input
wsaw:Action="http://tempuri.org/IxxxService/xxxRecordEntry"
message="tns:IxxxService_xxxRecordEntry_InputMessage" />
<wsdl:output
wsaw:Action="http://tempuri.org/IxxxService/xxxRecordEntryResponse"
message="tns:IxxxService_xxxRecordEntry_OutputMessage" />
</wsdl:operation>
<wsdl:operation name="xxxRecord">
<wsdl:input
wsaw:Action="http://tempuri.org/IxxxServiceMoniker/xxxRecord"
message="tns:IxxxServiceMoniker_xxxRecord_InputMessage" />
<wsdl:output
wsaw:Action="http://tempuri.org/IxxxServiceMoniker/xxxRecordResponse"
message="tns:IxxxServiceMoniker_xxxRecord_OutputMessage" />
</wsdl:operation>
</wsdl:portType>
<wsdl:portType name="IxxxServiceMoniker">
<wsdl:operation name="xxxRecord">
<wsdl:input
wsaw:Action="http://tempuri.org/IxxxMoniker/xxxRecord"
message="tns:IxxxServiceMoniker_xxxRecord_InputMessage" />
<wsdl:output
wsaw:Action="http://tempuri.org/IxxxServiceMoniker/xxxRecordResponse"
message="tns:IxxxServiceMoniker_xxxRecord_OutputMessage" />
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="BasicHttpBinding_IxxxService"
type="tns:IxxxService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="xxxRecordEntry">
<soap:operation
soapAction="http://tempuri.org/IxxxService/xxxRecordEntry"
style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="BasicHttpBinding_IxxxMoniker"
type="tns:IxxxMoniker">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
<wsdl:operation name="xxxRecord">
<soap:operation
soapAction="http://tempuri.org/IxxxMoniker/xxxRecord"
style="document" />
<wsdl:input>
<soap:body use="literal" />
</wsdl:input>
<wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="xxxService">
<wsdl:port name="BasicHttpBinding_IxxxService" binding="tns:BasicHttpBinding_IxxxService">
<soap:address location="http://aaaaa:pppp/xxxService.xxxService.svc"/>
</wsdl:port>
<wsdl:port name="BasicHttpBinding_IxxxServiceMoniker" binding="tns:BasicHttpBinding_IxxxServiceMoniker">
<soap:address location="http://aaaaa:pppp/xxxService.xxxService.svc/mo"/>
</wsdl:port>
</wsdl:service>
Proxy Configuration
<proxy xmlns="http://ws.apache.org/ns/synapse" name="testing20" transports="https,http" statistics="disable" trace="disable" startOnLoad="true">
<target>
<outSequence>
<send/>
</outSequence>
<endpoint>
<wsdl service="xxxService" port="BasicHttpBinding_IxxxService" uri="http://xxx:ppp/xxxLoggerService.xxxService.svc?wsdl"/>
</endpoint>
</target>
<publishWSDL uri="http://xxx:ppp/xxxLoggerService.xxxService.svc?wsdl"/>
<parameter name="useOriginalwsdl">true</parameter>
<parameter name="modifyUserWSDLPortAddress">true</parameter>
<description></description>
</proxy>
What is your proxy configuration? And which operations caused issue?
When you create proxy, you can disable unwanted bindings.That is, you can disable soap11 or soap12.
eg:<parameter name="disableSOAP12">true</parameter>

How to assign array in a BPEL process

I have a simple string as input and after calling a web service which adds the string to an array.Now i have to assign the array to the output(which i have set as a string array in the schema).The enterprise manager gives a fault and says the result contains multiple nodes for the XPath expression given.The Assign activity is shown as pending.So basically how do i assign an array or a list to the output variable which is also set as an array.The wsdl file used is:
<?xml version = '1.0' encoding = 'UTF-8'?>
<definitions
name="ReturnTypeService"
targetNamespace="http://examples2/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://examples2/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>
<types>
<xsd:schema>
<xsd:import namespace="http://examples2/" schemaLocation="http://localhost:7101/Examples2-Examples2-context-root/ReturnTypePort?xsd=1"/>
</xsd:schema>
</types>
<message name="display">
<part name="parameters" element="tns:display"/>
</message>
<message name="displayResponse">
<part name="parameters" element="tns:displayResponse"/>
</message>
<portType name="ReturnType">
<operation name="display">
<input message="tns:display"/>
<output name="displayResponse"
message="tns:displayResponse"/>
</operation>
</portType>
<binding name="ReturnTypePortBinding" type="tns:ReturnType">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="display">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
</operation>
</binding>
<service name="ReturnTypeService">
<port name="ReturnTypePort" binding="tns:ReturnTypePortBinding">
<soap:address location="http://localhost:7101/Examples2-Examples2-context-root/ReturnTypePort"/>
</port>
</service>
</definitions>
#vanto Is there a way to assign an array from input variable to invoke_input variable?The problem is there are multiple inputs in my web service so i am not able to copy the wrapping element in input variable to wrapping variable in invoke variable.Will copy the snippet of the code here :
<assign name="Assign1">
<copy>
<from variable="inputVariable" part="payload"
query="/ns2:process/ns2:dsaName"/>
<to variable="Invoke1_processList_InputVariable"
part="parameters" query="/ns1:processList/dsaName"/>
</copy>
<copy>
<from variable="inputVariable" part="payload"
query="/ns2:process/ns2:linesOfData"/>
<to variable="Invoke1_processList_InputVariable"
part="parameters" query="/ns1:processList/linesOfData"/>
</copy>
<copy>
<from variable="inputVariable" part="payload"
query="/ns2:process/ns2:description"/>
<to variable="Invoke1_processList_InputVariable"
part="parameters" query="/ns1:processList/description"/>
</copy>
<copy>
<from variable="inputVariable" part="payload"
query="/ns2:process/ns2:application"/>
<to variable="Invoke1_processList_InputVariable"
part="parameters" query="/ns1:processList/application"/>
</copy>
</assign>
The problem is only one is of list type all others are of string type.The XML for this is:
<element name="process">
<complexType>
<sequence>
<element name="dsaName" type="string" minOccurs="0"/>
<element name="linesOfData" type="string" minOccurs="0" maxOccurs="unbounded"/>
<element name="description" type="string" minOccurs="0"/>
</sequence>
</complexType>
</element>
<element name="processResponse">
<complexType>
<sequence>
<element name="result" type="string" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
</element>
</schema>
A from-spec and to-spec must not select more than one element or attribute. In your case it appears to select all <return> elements in your variable's part (i.e. the items of the array). Try to copy the element that wraps the items (i.e. the ns1:displayResponse element) and copy this element to ns2:processResponse (the wrapping element in the to-variable).
Since both source and target elements seem to be in different namespaces and are of different types, you probably need to run it through an XSLT script (using doXSLTransform) to translate it from the source schema to the target schema.

Resources