hi all,
when I'm sending request observed json body is dropped from the sequence.

<inSequence>
   <property name="api.ut.backendRequestTime"
             expression="get-property('SYSTEM_TIME')"/>
   <property name="HTTP_METHOD" value="POST" scope="axis2" type="STRING"/>
   <header name="SOAPAction"
           scope="transport"
           value=""
           description="SOAPAction"/>
   <property name="REST_URL_POSTFIX" scope="axis2" action="remove"/>
   <property name="req.var.sayHelloToName.arg0"
             expression="json-eval($.sayHelloToName.arg0)"/>
   <payloadFactory media-type="xml" description="transform">
      <format>
         <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:web="http://www.jboss.org/eap/quickstarts/wshelloworld/HelloWorld";>
            <soapenv:Header/>
            <soapenv:Body>
               <web:sayHelloToName>
                  <arg0>$1</arg0>
               </web:sayHelloToName>
            </soapenv:Body>
         </soapenv:Envelope>
      </format>
      <args>
         <arg evaluator="xml"
              expression="get-property('req.var.sayHelloToName.arg0')"/>
      </args>
   </payloadFactory>
   <property name="messageType"
             value="text/xml"
             scope="axis2"
             type="STRING"
             description="messageProperty"/>
   <filter source="$ctx:AM_KEY_TYPE" regex="PRODUCTION">
      <then>
         <send>
            <endpoint key="sayhellodoc--v1_APIproductionEndpoint"/>
         </send>
      </then>
      <else>
         <sequence key="_sandbox_key_error_"/>
      </else>
   </filter>
</inSequence>




highlighted the lines where issue happens in the wire logs.


[2018-09-28 12:28:44,508] DEBUG - wire HTTPS-Listener I/O dispatcher-7 >>
"POST /say/1/sayHelloToName HTTP/1.1[\r][\n]"

[2018-09-28 12:28:44,508] DEBUG - wire HTTPS-Listener I/O dispatcher-7 >>
"Host: 10.100.5.83:8243[\r][\n]"

[2018-09-28 12:28:44,508] DEBUG - wire HTTPS-Listener I/O dispatcher-7 >>
"User-Agent: curl/7.54.0[\r][\n]"

[2018-09-28 12:28:44,508] DEBUG - wire HTTPS-Listener I/O dispatcher-7 >>
"accept: application/json[\r][\n]"

[2018-09-28 12:28:44,508] DEBUG - wire HTTPS-Listener I/O dispatcher-7 >>
"Content-Type: application/json[\r][\n]"

[2018-09-28 12:28:44,508] DEBUG - wire HTTPS-Listener I/O dispatcher-7 >>
"Authorization: Bearer cb7b5a3e-a3f6-3489-a3c7-64bed31675a1[\r][\n]"

[2018-09-28 12:28:44,509] DEBUG - wire HTTPS-Listener I/O dispatcher-7 >>
"Content-Length: 41[\r][\n]"

[2018-09-28 12:28:44,509] DEBUG - wire HTTPS-Listener I/O dispatcher-7 >>
"[\r][\n]"

[2018-09-28 12:28:44,509] DEBUG - wire HTTPS-Listener I/O dispatcher-7 >>
"{ "sayHelloToName": { "arg0": "string" }}"

[2018-09-28 12:28:44,509] DEBUG - headers http-incoming-15 >> POST
/say/1/sayHelloToName HTTP/1.1

[2018-09-28 12:28:44,509] DEBUG - headers http-incoming-15 >> Host:
10.100.5.83:8243

[2018-09-28 12:28:44,509] DEBUG - headers http-incoming-15 >> User-Agent:
curl/7.54.0

[2018-09-28 12:28:44,509] DEBUG - headers http-incoming-15 >> accept:
application/json

[2018-09-28 12:28:44,509] DEBUG - headers http-incoming-15 >> Content-Type:
application/json

[2018-09-28 12:28:44,509] DEBUG - headers http-incoming-15 >>
Authorization: Bearer cb7b5a3e-a3f6-3489-a3c7-64bed31675a1

[2018-09-28 12:28:44,509] DEBUG - headers http-incoming-15 >>
Content-Length: 41

[2018-09-28 12:28:45,691] DEBUG - headers http-outgoing-10 >> POST
/helloworld-ws-document/HelloWorldService HTTP/1.1

[2018-09-28 12:28:45,691] DEBUG - headers http-outgoing-10 >> SOAPAction:

[2018-09-28 12:28:45,691] DEBUG - headers http-outgoing-10 >> accept:
application/json

[2018-09-28 12:28:45,691] DEBUG - headers http-outgoing-10 >> Content-Type:
text/xml; charset=UTF-8

[2018-09-28 12:28:45,691] DEBUG - headers http-outgoing-10 >>
Transfer-Encoding: chunked

[2018-09-28 12:28:45,691] DEBUG - headers http-outgoing-10 >> Host:
www.treinar.prodepa.gov.br

[2018-09-28 12:28:45,691] DEBUG - headers http-outgoing-10 >> Connection:
Keep-Alive

[2018-09-28 12:28:45,691] DEBUG - headers http-outgoing-10 >> User-Agent:
Synapse-PT-HttpComponents-NIO

[2018-09-28 12:28:45,692] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
"POST /helloworld-ws-document/HelloWorldService HTTP/1.1[\r][\n]"

[2018-09-28 12:28:45,692] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
"SOAPAction: [\r][\n]"

[2018-09-28 12:28:45,692] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
"accept: application/json[\r][\n]"

[2018-09-28 12:28:45,692] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
"Content-Type: text/xml; charset=UTF-8[\r][\n]"

[2018-09-28 12:28:45,692] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
"Transfer-Encoding: chunked[\r][\n]"

[2018-09-28 12:28:45,692] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
"Host: www.treinar.prodepa.gov.br[\r][\n]"

[2018-09-28 12:28:45,692] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
"Connection: Keep-Alive[\r][\n]"

[2018-09-28 12:28:45,692] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
"User-Agent: Synapse-PT-HttpComponents-NIO[\r][\n]"

[2018-09-28 12:28:45,693] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
"[\r][\n]"

[2018-09-28 12:28:45,693] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
"ad[\r][\n]"

[2018-09-28 12:28:45,693] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
"<web:sayHelloToName xmlns:web="
http://www.jboss.org/eap/quickstarts/wshelloworld/HelloWorld";><arg0 xmlns="
http://ws.apache.org/ns/synapse";>string</arg0></web:sayHelloToName>[\r][\n]"

[2018-09-28 12:28:45,693] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
"0[\r][\n]"

[2018-09-28 12:28:45,693] DEBUG - wire HTTPS-Sender I/O dispatcher-2 <<
"[\r][\n]"

[2018-09-28 12:28:46,162] DEBUG - wire HTTPS-Sender I/O dispatcher-2 >>
"HTTP/1.1 500 Internal Server Error[\r][\n]"

[2018-09-28 12:28:46,162] DEBUG - wire HTTPS-Sender I/O dispatcher-2 >>
"Date: Fri, 28 Sep 2018 06:58:45 GMT[\r][\n]"

[2018-09-28 12:28:46,162] DEBUG - wire HTTPS-Sender I/O dispatcher-2 >>
"Server: Apache/2.4.6 (Red Hat)[\r][\n]"

[2018-09-28 12:28:46,163] DEBUG - wire HTTPS-Sender I/O dispatcher-2 >>
"Content-Type: text/xml;charset=UTF-8[\r][\n]"

[2018-09-28 12:28:46,163] DEBUG - wire HTTPS-Sender I/O dispatcher-2 >>
"Content-Length: 343[\r][\n]"

[2018-09-28 12:28:46,163] DEBUG - wire HTTPS-Sender I/O dispatcher-2 >>
"Connection: close[\r][\n]"

[2018-09-28 12:28:46,163] DEBUG - wire HTTPS-Sender I/O dispatcher-2 >>
"[\r][\n]"

[2018-09-28 12:28:46,163] DEBUG - wire HTTPS-Sender I/O dispatcher-2 >>
"<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/
"><soap:Body><soap:Fault><faultcode>soap:VersionMismatch</faultcode><faultstring>"
http://www.jboss.org/eap/quickstarts/wshelloworld/HelloWorld";, the
namespace on the "sayHelloToName" element, is not a valid SOAP
version.</faultstring></soap:Fault></soap:Body></soap:Envelope>"








also adding  "xmlns="http://ws.apache.org/ns/synapse"; to argo.




can I know why this happens?


thanks.


-- 
*Nalaka Senarathna*
*Associate Software Engineer | WSO2*

*Email : [email protected] <[email protected]>*
*Mobile : +94714118474*
*web :  https://wso2.com <https://wso2.com>*
<https://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to