Hi, I was wondering if you could give me some help for a XSLT transformation
by using a transformer proxy.

I've a SOAP flow in input which I would like transform in standard XML to
interface to my CRM solution : 

INPUT FLOW :


<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";

       xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/1999/XMLSchema";>

       <SOAP-ENV:Body>

             <root>

                    <user>machin</user>

                    <password>machin</password>

             </root>

       </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

 

 

OUTPUT FLOW: 


<<?xml version="1.0" encoding="UTF-8" ?> 

- <<novae-user xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/";>

  < <user>machin</user> 

  < <password>machin</password> 

 </novae-user>

 

 

 

So, I use a the WSO2 ESB solution with the proxy service: "Custom Proxy".

I create a sequence :

 


<sequence xmlns="http://ws.apache.org/ns/synapse"; name="MySeqTest"
trace="disable">

   <in>

      <xslt key="conf:/users/MyXSLTTest <conf://users/MyXSLTTest> " />

      <send />

   </in>

   <out />

</sequence>

 

Where MyXSLTTest is like : 

 


<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/"; version="1.0">

  <xsl:output method="xml" media-type="text/xml"></xsl:output>

  <xsl:template match="/">

    <novae-user>

      <user>

        

      <xsl:value-of
select="ns1:Envelope/ns1:Body/root/user"></xsl:value-of></user>

      <password>

        

      <xsl:value-of
select="ns1:Envelope/ns1:Body/root/password"></xsl:value-of></password>

    </novae-user>

  </xsl:template>

</xsl:stylesheet>

 

I configure my custom proxy :

 

Step 1 : basic settings

-I named it transformtest

-I selected only http

Step 2:

-I used a existing sequence named myseqtest

-I defined a endpoint which is a j2ee application that logs all access to
the url

Step 3:

-I leaved all information by default.

 

So I've this configuration : 

 


<proxy xmlns="http://ws.apache.org/ns/synapse"; name="TransformTest"
transports="http" statistics="disable" trace="disable" startOnLoad="true">

   <target inSequence="MySeqTest">

      <outSequence>

         <send />

      </outSequence>

      <endpoint>

         <address uri="http://localhost:8080/EchoApplication/echoServlet?";
/>

      </endpoint>

   </target>

</proxy>                           

 

Next, after to save all configuration , iwanted to test if the proxy works
but I fall into the same error  in the SOAP GUI software or the Test service
provided by wso2 :

 


<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";

                xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/1999/XMLSchema";>

                <SOAP-ENV:Body>

                               <root>

                                               <user>machin</user>

                                               <password>machin</password>

                               </root>

                </SOAP-ENV:Body>

</SOAP-ENV:Envelope>

 

I've this reponse : 

 


<TryitClient xmlns="http://tryit.carbon.wso2.org";>

   <Reason>Error connecting to the Tryit ajax proxy</Reason>

</TryitClient>

 

Or in log : 

 

[2012-02-20 16:57:01,550] ERROR - Axis2Sender Unexpected error during
sending message out

org.apache.axis2.AxisFault: The system cannot infer the transport
information from the /services/TransformTest.TransformTestHttpSoap11Endpoint
URL.

        at
org.apache.axis2.description.ClientUtils.inferOutTransport(ClientUtils.java:
81)

        at
org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.ex
ecuteImpl(DynamicAxisOperation.java:123)

        at
org.apache.axis2.client.OperationClient.execute(OperationClient.java:165)

        at
org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPCl
ient.java:441)

        at
org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:57)

        at
org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvir
onment.java:281)

        at
org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:
84)

        at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediat
or.java:60)

        at
org.apache.synapse.mediators.filters.InMediator.mediate(InMediator.java:55)

        at
org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediat
or.java:60)

        at
org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.
java:114)

        at
org.apache.synapse.core.axis2.ProxyServiceMessageReceiver.receive(ProxyServi
ceMessageReceiver.java:144)

        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)

        at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HT
TPTransportUtils.java:172)

        at
org.apache.synapse.transport.nhttp.ServerWorker.processEntityEnclosingMethod
(ServerWorker.java:409)

        at
org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:261)

        at
org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerP
ool.java:173)

        at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.ja
va:886)

        at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:9
08)

        at java.lang.Thread.run(Thread.java:662)

 

Could you give me some help for this proxy ??? Thanks you 

 

Description : sign_benoit

 

<<image001.png>>

_______________________________________________
Esb-java-user mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/esb-java-user

Reply via email to