Thanks Harsha, that worked!
The issue was caused by sending the following value in the payloadFactory
of the insequence,
payloadFactory media-type=xml
format
* soapenv:Envelope
xmlns:soapenv=http://schemas.xmlsoap.org/soap/envelope/
http://schemas.xmlsoap.org/soap/envelope/
Guys it worked for me with my config I mean how Uvindra can't ?
*xxx-MacBook-Pro:bin dushan$ curl -i -POST -H 'Accept: application/json' -H
'Content-Type:application/json' -d
'{celsius:12}' http://192.168.56.1:8281/temp
http://192.168.56.1:8281/temp*
*HTTP/1.1 200 OK*
*X-AspNet-Version:
Can you share the wire logs?
On Sat, Feb 7, 2015 at 12:50 PM, Uvindra Dias Jayasinha uvin...@wso2.com
wrote:
The Premature end of file exception is still happening even when I add
those two properties in, this is a parser error happening on our end in the
insequence itself. I still cant
With wire logs on the issue becomes a bit more clear,
21:34:56,129 POST /temp HTTP/1.1[\r][\n]
21:34:56,130 User-Agent: curl/7.35.0[\r][\n]
21:34:56,130 Host: 10.0.3.1:8281[\r][\n]
21:34:56,130 Accept: application/json[\r][\n]
21:34:56,130 Content-Type:application/json[\r][\n]
Hi Uvindra,
I checked with this with esb 4.8.1 fresh pack. It worked fine with below
config. Please find my api config and response.
api name=tempAPI context=/temp
resource methods=POST GET
inSequence
log level=custom
property name=IN_MESSAGE
The Premature end of file exception is still happening even when I add
those two properties in, this is a parser error happening on our end in the
insequence itself. I still cant understand why this isnt working.
On 7 February 2015 at 12:15, Chanaka Fernando chana...@wso2.com wrote:
Hi Uvindra,
Hi Uvindra,
According to the website, they expect content-length header in the request.
You can use the below two property mediators to send the content-length
always.
property name=FORCE_HTTP_CONTENT_LENGTH value=true
scope=axis2/property
property name=COPY_CONTENT_LENGTH_FROM_INCOMING
Your API should be as.
api xmlns=http://ws.apache.org/ns/synapse; name=tempAPI context=/temp
resource methods=POST GET
inSequence
log level=custom
property name=IN_MESSAGE
Ok tried that Dushan, but now I get a different exception when I hit the
insequence
23:24:38,849 LogMediator IN_MESSAGE =
IN_MESSAGE
RelayUtils Error while building Passthrough stream
Thanks Sampath and Asanka,
Tried both your suggestions and now Im getting different exception
RelayUtils Error while building Passthrough stream
org.apache.axiom.om.OMException: javax.xml.stream.XMLStreamException:
ParseError at [row,col]:[3,68]
Message: DOCTYPE is not allowed
at
Im trying out Payload and Script mediator functionality to call this SOAP
service,
http://www.w3schools.com/webservices/tempconvert.asmx?op=CelsiusToFahrenheit
by simulating a REST API using ESB 4.8.1, here is the synapse configuration
I have defined
api xmlns=http://ws.apache.org/ns/synapse;
Hi Uvindra,
Try like below.
payloadFactory media-type=xml
format
web:CelsiusToFahrenheit xmlns:web=
http://www.w3schools.com/webservices/;
web:Celsius$1/web:Celsius
/web:CelsiusToFahrenheit
/format
Hi Uvindra,
Seems message failing during the building. And it picks the wrong formatter
it seems. Set the content header in the curl as follows.
curl -i -POST -H 'Accept: application/json' -H
'Content-Type:application/json' -d '{celsius:12}' http://IP
Address:8280/api context
Thanks,
Asanka D
13 matches
Mail list logo