You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Michele Mazzucco <Mi...@ncl.ac.uk> on 2008/02/07 16:28:09 UTC

[axis2] Unexpected character 'E' (code 69) in prolog; expected '<'

Hello everybody,

I'm getting this error on the client side

  ERROR 15:16:40,047 (QueueController.java:200) - Unable to add  
stream for queue ServiceTwo,  
com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character  
'E' (code 69) in prolog; expected '<'
      [java]  at [row,col {unknown-source}]: [1,1]

This error is not new (see here http://mail-archives.apache.org/ 
mod_mbox/ws-axis-user/200707.mbox/%3C4688E9A1.8070808@wso2.com%3E for  
example)

when an user exception is thrown on the server side. The servers log  
tells me about an error processing a POST request. The error occurs  
at ServerWorker:421 (I'm using the NIO listener/sender)

ERROR 15:15:06,766 (ServerWorker.java:421) - Error processing POST  
request
org.apache.axis2.AxisFault:  
ncl.qosp.controller.policies.admission.streams.RejectedStreamException:  
Stream rejected 12
         at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
         at ncl.qosp.controller.streams.StreamRoutingService.addStream 
(StreamRoutingService.java:309)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke 
(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at  
org.apache.axis2.receivers.RawXMLINOutMessageReceiver.invokeBusinessLogi 
c(RawXMLINOutMessageReceiver.java:97)
         at  
org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusine 
ssLogic(AbstractInOutSyncMessageReceiver.java:42)
         at org.apache.axis2.receivers.AbstractMessageReceiver.receive 
(AbstractMessageReceiver.java:96)
         at org.apache.axis2.engine.AxisEngine.receive 
(AxisEngine.java:145)
         at  
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReques 
t(HTTPTransportUtils.java:275)
         at org.apache.axis2.transport.nhttp.ServerWorker.processPost 
(ServerWorker.java:207)
         at org.apache.axis2.transport.nhttp.ServerWorker.run 
(ServerWorker.java:171)
         at  
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
$Worker.runTask(ThreadPoolExecutor.java:665)
         at  
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
$Worker.run(ThreadPoolExecutor.java:690)
         at java.lang.Thread.run(Thread.java:595)
Caused by:  
ncl.qosp.controller.policies.admission.streams.RejectedStreamException:  
ncl.qosp.controller.policies.admission.streams.RejectedStreamException:  
Stream rejected 12
         at  
ncl.qosp.controller.dispatcher.streams.StreamDispatcherImpl.addStream 
(StreamDispatcherImpl.java:363)
         at ncl.qosp.controller.streams.StreamRoutingService.addStream 
(StreamRoutingService.java:290)
         ... 14 more
Caused by:  
ncl.qosp.controller.policies.admission.streams.RejectedStreamException:  
Stream rejected 12
         at  
ncl.qosp.controller.dispatcher.streams.StreamEvaluatorTask.call 
(StreamEvaluatorTask.java:176)
         at  
ncl.qosp.controller.dispatcher.streams.StreamEvaluatorTask.call 
(StreamEvaluatorTask.java:37)
         at java.util.concurrent.FutureTask$Sync.innerRun 
(FutureTask.java:269)
         at java.util.concurrent.FutureTask.run(FutureTask.java:123)
         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask 
(ThreadPoolExecutor.java:650)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run 
(ThreadPoolExecutor.java:675)
         ... 1 more
Exception in thread "HttpServerWorker-15" java.lang.NullPointerException
         at  
org.apache.axis2.transport.nhttp.ServerWorker.handleException 
(ServerWorker.java:441)
         at org.apache.axis2.transport.nhttp.ServerWorker.processPost 
(ServerWorker.java:214)
         at org.apache.axis2.transport.nhttp.ServerWorker.run 
(ServerWorker.java:171)
         at  
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
$Worker.runTask(ThreadPoolExecutor.java:665)
         at  
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
$Worker.run(ThreadPoolExecutor.java:690)
         at java.lang.Thread.run(Thread.java:595)



 From the source code I understand that:
1 - the output stream is null, or
2 - the exception message is null


Any idea?


Thanks in advance,
Michele



---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: WSDL parser

Posted by Demetris G <de...@ece.neu.edu>.
Hi Sukma -

once again thanks for the quick response - much appreciated -
I tried #1 but not #3. I am migrating to SOAP 1.2 so I will also
look into the second option you list. I will let the list know how that
one goes as well.

Regards

Sukma Agung Verdianto wrote:
> Hi Demitris,
>
> Sorry for this late response,
> I'm not sure if there is a 'ready to use' parser to extract 
> information out of SOAP message. But I guess Axis2 have it.
>
> Extracting information from soap message is quite complex.
> There are several ways to get those information (eg: operations, to, 
> replyto):
> 1. If you use older SOAP version (1.1) and HTTP transport - operation 
> name is defined as HTTP attribute (Could not remember the name, 
> "Action" or "Operation")
> 2. In SOAP (1.2) and HTTP transport there is also an extra HTTP 
> attribute (not sure where, you can check by capturing using tcpmon)
> 3. This is more difficult, if your soap use WS_Addressing standard, 
> you may read the SOAP header and look for wsa:Action element value.
>
> Example of SOAP with WS-Addressing header. (see <wsa:Action element)
>        <wsa:To xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" soapenv:mustUnderstand="1" wsu:Id="Id-13283276">http://localhost:8888/axis2/services/CalculatorService?wsdl</wsa:To>
>          <wsa:ReplyTo xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" soapenv:mustUnderstand="1" wsu:Id="Id-14395294">
>             <wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
>          </wsa:ReplyTo>
>          <wsa:MessageID xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" soapenv:mustUnderstand="1" wsu:Id="Id-14264518">urn:uuid:0E4DF98317F35D31DE1179281210189</wsa:MessageID>
>          <wsa:Action xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" soapenv:mustUnderstand="1" wsu:Id="Id-14123379">urn:Divide</wsa:Action>
>       </soapenv:Header>
>
> I hope this will help. :)
>
> Regards,
> Sukma
>
> On Feb 19, 2008 11:46 AM, Demetris G <demetris@ece.neu.edu 
> <ma...@ece.neu.edu>> wrote:
>
>
>     Hey Sukma,
>
>        the code below worked fine - I can get the operations out of the
>     WSDL. Is there
>     a similar parser for identifying and extracting the methods out of
>     outgoing (from the
>     stubs) SOAP messages? I capture the SOAP message and I can parse
>     it manually
>     but is there a standard way (like the code below) for identifying the
>     methods the
>     SOAP message is destined to?
>
>     Thanks much once again
>
>     Sukma Agung Verdianto wrote:
>     > Hi Demetris,
>     >
>     > You can try to use wsdl4j
>     (http://sourceforge.net/projects/wsdl4j) to
>     > get the operations of specified wsdl file. (AFAIK, Axis2 uses
>     this in
>     > their wsdl2java code)
>     >
>     > public static void main(String[] args) throws Exception {
>     >
>     > WSDLFactory fac = WSDLFactoryImpl.newInstance();
>     >
>     > WSDLReader reader = fac.newWSDLReader();
>     >
>     > Definition def =
>     > reader.readWSDL("http://api.google.com/GoogleSearch.wsdl");
>     >
>     > Map services = def.getServices();
>     >
>     > for(Object serviceKey : services.keySet()) {
>     >
>     > QName serviceQName = (QName) serviceKey;
>     >
>     > Service service = (Service) services.get(serviceQName);
>     >
>     > System.out.println("Namespace: " +
>     > service.getQName().getNamespaceURI() + ", Service Name: " +
>     > service.getQName().getLocalPart());
>     >
>     > Map ports = service.getPorts();
>     >
>     > for(Object portKey : ports.keySet()) {
>     >
>     > String portName = (String) portKey;
>     >
>     > Port port = (Port) ports.get(portName);
>     >
>     > System.out.println("  Namespace: " +
>     > port.getBinding().getQName().getNamespaceURI() + ", Binding
>     Name: " +
>     > port.getBinding().getQName().getLocalPart());
>     >
>     > List operations = port.getBinding().getBindingOperations();
>     >
>     > for(Object operation : operations) {
>     >
>     > BindingOperation op = (BindingOperation) operation;
>     >
>     > System.out.print("    Operation Name: " + op.getName());
>     >
>     > List ll = op.getExtensibilityElements();
>     >
>     > for(Object soap : ll) {
>     >
>     > if(SOAPOperation.class.isInstance(soap)) {
>     >
>     > System.out.print(" (" + ((SOAPOperation)soap).getSoapActionURI()
>     + ")");
>     >
>     > }
>     >
>     > }
>     >
>     > System.out.println();
>     >
>     > }
>     >
>     > }
>     >
>     > }
>     >
>     > }
>     >
>     >
>     > Above code read remote wsdl, and extract its information.
>     >
>     > Regards,
>     > Sukma
>     >
>     > On Feb 17, 2008 2:09 PM, Demetris G <demetris@ece.neu.edu
>     <ma...@ece.neu.edu>
>     > <mailto:demetris@ece.neu.edu <ma...@ece.neu.edu>>> wrote:
>     >
>     >
>     >     Hi all,
>     >
>     >        I am trying to use the wsdlParser from the Axis API to parse
>     >     the methods
>     >     out of an incoming WSDL file - does anyone who has used this
>     >     before have
>     >     any info on how to use this tool? OR any other way I could
>     get the
>     >     operations
>     >     of the remote service out of the WSDL file? I would
>     appreciate it.
>     >
>     >     Thanks
>     >
>     >
>     >    
>     ---------------------------------------------------------------------
>     >     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     >     <mailto:axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>>
>     >     For additional commands, e-mail:
>     axis-user-help@ws.apache.org <ma...@ws.apache.org>
>     >     <mailto:axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>>
>     >
>     >
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: WSDL parser

Posted by Sukma Agung Verdianto <sa...@gmail.com>.
Hi Demitris,
Sorry for this late response,
I'm not sure if there is a 'ready to use' parser to extract information out
of SOAP message. But I guess Axis2 have it.

Extracting information from soap message is quite complex.
There are several ways to get those information (eg: operations, to,
replyto):
1. If you use older SOAP version (1.1) and HTTP transport - operation name
is defined as HTTP attribute (Could not remember the name, "Action" or
"Operation")
2. In SOAP (1.2) and HTTP transport there is also an extra HTTP attribute
(not sure where, you can check by capturing using tcpmon)
3. This is more difficult, if your soap use WS_Addressing standard, you may
read the SOAP header and look for wsa:Action element value.

Example of SOAP with WS-Addressing header. (see <wsa:Action element)

       <wsa:To xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
soapenv:mustUnderstand="1"
wsu:Id="Id-13283276">http://localhost:8888/axis2/services/CalculatorService?wsdl</wsa:To>
         <wsa:ReplyTo
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
soapenv:mustUnderstand="1" wsu:Id="Id-14395294">
            <wsa:Address>http://www.w3.org/2005/08/addressing/anonymous</wsa:Address>
         </wsa:ReplyTo>
         <wsa:MessageID
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
soapenv:mustUnderstand="1"
wsu:Id="Id-14264518">urn:uuid:0E4DF98317F35D31DE1179281210189</wsa:MessageID>
        <wsa:Action
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
soapenv:mustUnderstand="1"
wsu:Id="Id-14123379">urn:Divide</wsa:Action>      </soapenv:Header>


I hope this will help. :)

Regards,
Sukma

On Feb 19, 2008 11:46 AM, Demetris G <de...@ece.neu.edu> wrote:

>
> Hey Sukma,
>
>    the code below worked fine - I can get the operations out of the
> WSDL. Is there
> a similar parser for identifying and extracting the methods out of
> outgoing (from the
> stubs) SOAP messages? I capture the SOAP message and I can parse it
> manually
> but is there a standard way (like the code below) for identifying the
> methods the
> SOAP message is destined to?
>
> Thanks much once again
>
> Sukma Agung Verdianto wrote:
> > Hi Demetris,
> >
> > You can try to use wsdl4j (http://sourceforge.net/projects/wsdl4j) to
> > get the operations of specified wsdl file. (AFAIK, Axis2 uses this in
> > their wsdl2java code)
> >
> > public static void main(String[] args) throws Exception {
> >
> > WSDLFactory fac = WSDLFactoryImpl.newInstance();
> >
> > WSDLReader reader = fac.newWSDLReader();
> >
> > Definition def =
> > reader.readWSDL("http://api.google.com/GoogleSearch.wsdl");
> >
> > Map services = def.getServices();
> >
> > for(Object serviceKey : services.keySet()) {
> >
> > QName serviceQName = (QName) serviceKey;
> >
> > Service service = (Service) services.get(serviceQName);
> >
> > System.out.println("Namespace: " +
> > service.getQName().getNamespaceURI() + ", Service Name: " +
> > service.getQName().getLocalPart());
> >
> > Map ports = service.getPorts();
> >
> > for(Object portKey : ports.keySet()) {
> >
> > String portName = (String) portKey;
> >
> > Port port = (Port) ports.get(portName);
> >
> > System.out.println("  Namespace: " +
> > port.getBinding().getQName().getNamespaceURI() + ", Binding Name: " +
> > port.getBinding().getQName().getLocalPart());
> >
> > List operations = port.getBinding().getBindingOperations();
> >
> > for(Object operation : operations) {
> >
> > BindingOperation op = (BindingOperation) operation;
> >
> > System.out.print("    Operation Name: " + op.getName());
> >
> > List ll = op.getExtensibilityElements();
> >
> > for(Object soap : ll) {
> >
> > if(SOAPOperation.class.isInstance(soap)) {
> >
> > System.out.print(" (" + ((SOAPOperation)soap).getSoapActionURI() + ")");
> >
> > }
> >
> > }
> >
> > System.out.println();
> >
> > }
> >
> > }
> >
> > }
> >
> > }
> >
> >
> > Above code read remote wsdl, and extract its information.
> >
> > Regards,
> > Sukma
> >
> > On Feb 17, 2008 2:09 PM, Demetris G <demetris@ece.neu.edu
> > <ma...@ece.neu.edu>> wrote:
> >
> >
> >     Hi all,
> >
> >        I am trying to use the wsdlParser from the Axis API to parse
> >     the methods
> >     out of an incoming WSDL file - does anyone who has used this
> >     before have
> >     any info on how to use this tool? OR any other way I could get the
> >     operations
> >     of the remote service out of the WSDL file? I would appreciate it.
> >
> >     Thanks
> >
> >
> >
> ---------------------------------------------------------------------
> >     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>
> >     For additional commands, e-mail: axis-user-help@ws.apache.org
> >     <ma...@ws.apache.org>
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: WSDL parser

Posted by Demetris G <de...@ece.neu.edu>.
Hey Sukma,

    the code below worked fine - I can get the operations out of the 
WSDL. Is there
a similar parser for identifying and extracting the methods out of 
outgoing (from the
stubs) SOAP messages? I capture the SOAP message and I can parse it manually
but is there a standard way (like the code below) for identifying the 
methods the
SOAP message is destined to?

Thanks much once again

Sukma Agung Verdianto wrote:
> Hi Demetris,
>
> You can try to use wsdl4j (http://sourceforge.net/projects/wsdl4j) to 
> get the operations of specified wsdl file. (AFAIK, Axis2 uses this in 
> their wsdl2java code)
>
> public static void main(String[] args) throws Exception {
>
> WSDLFactory fac = WSDLFactoryImpl.newInstance();
>
> WSDLReader reader = fac.newWSDLReader();
>
> Definition def = 
> reader.readWSDL("http://api.google.com/GoogleSearch.wsdl");
>
> Map services = def.getServices();
>
> for(Object serviceKey : services.keySet()) {
>
> QName serviceQName = (QName) serviceKey;
>
> Service service = (Service) services.get(serviceQName);
>
> System.out.println("Namespace: " + 
> service.getQName().getNamespaceURI() + ", Service Name: " + 
> service.getQName().getLocalPart());
>
> Map ports = service.getPorts();
>
> for(Object portKey : ports.keySet()) {
>
> String portName = (String) portKey;
>
> Port port = (Port) ports.get(portName);
>
> System.out.println("  Namespace: " + 
> port.getBinding().getQName().getNamespaceURI() + ", Binding Name: " + 
> port.getBinding().getQName().getLocalPart());
>
> List operations = port.getBinding().getBindingOperations();
>
> for(Object operation : operations) {
>
> BindingOperation op = (BindingOperation) operation;
>
> System.out.print("    Operation Name: " + op.getName());
>
> List ll = op.getExtensibilityElements();
>
> for(Object soap : ll) {
>
> if(SOAPOperation.class.isInstance(soap)) {
>
> System.out.print(" (" + ((SOAPOperation)soap).getSoapActionURI() + ")");
>
> }
>
> }
>
> System.out.println();
>
> }
>
> }
>
> }
>
> }
>
>
> Above code read remote wsdl, and extract its information.
>
> Regards,
> Sukma
>
> On Feb 17, 2008 2:09 PM, Demetris G <demetris@ece.neu.edu 
> <ma...@ece.neu.edu>> wrote:
>
>
>     Hi all,
>
>        I am trying to use the wsdlParser from the Axis API to parse
>     the methods
>     out of an incoming WSDL file - does anyone who has used this
>     before have
>     any info on how to use this tool? OR any other way I could get the
>     operations
>     of the remote service out of the WSDL file? I would appreciate it.
>
>     Thanks
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: WSDL parser

Posted by Demetris G <de...@ece.neu.edu>.
Hey Sukma,

    thanks for the response - I oringally went with the second option 
but I was getting an exception
on the StringReader. I think I know what the problem is - at least you 
verified for me that I am on
the right path. I appreciate it.

Many regards once again

Sukma Agung Verdianto wrote:
> Hi Demetris,
>
> To read a local file you could simply use 
> "file:///path/to/wsdl/file.wsdl" as readWSDL argument 
> -> reader.readWSDL("file:///path/to/your/wsdl");,
> Or if you have a WSDL serialized in String, you could 
> use reader.readWSDL(null, new InputSource(new StringReader(wsdlString)));
>
> Regards,
> Sukma
>
> On Fri, Feb 22, 2008 at 1:22 PM, Demetris G <demetris@ece.neu.edu 
> <ma...@ece.neu.edu>> wrote:
>
>
>     Hi all,
>
>        does anyone know of a piece of code similar to the one below that
>     can read/parse  a local WSDL file
>     serialized in a string rather than a remote WSDL given by a URI?
>
>     Thanks
>
>     Sukma Agung Verdianto wrote:
>     > Hi Demetris,
>     >
>     > You can try to use wsdl4j
>     (http://sourceforge.net/projects/wsdl4j) to
>     > get the operations of specified wsdl file. (AFAIK, Axis2 uses
>     this in
>     > their wsdl2java code)
>     >
>     > public static void main(String[] args) throws Exception {
>     >
>     > WSDLFactory fac = WSDLFactoryImpl.newInstance();
>     >
>     > WSDLReader reader = fac.newWSDLReader();
>     >
>     > Definition def =
>     > reader.readWSDL("http://api.google.com/GoogleSearch.wsdl");
>     >
>     > Map services = def.getServices();
>     >
>     > for(Object serviceKey : services.keySet()) {
>     >
>     > QName serviceQName = (QName) serviceKey;
>     >
>     > Service service = (Service) services.get(serviceQName);
>     >
>     > System.out.println("Namespace: " +
>     > service.getQName().getNamespaceURI() + ", Service Name: " +
>     > service.getQName().getLocalPart());
>     >
>     > Map ports = service.getPorts();
>     >
>     > for(Object portKey : ports.keySet()) {
>     >
>     > String portName = (String) portKey;
>     >
>     > Port port = (Port) ports.get(portName);
>     >
>     > System.out.println("  Namespace: " +
>     > port.getBinding().getQName().getNamespaceURI() + ", Binding
>     Name: " +
>     > port.getBinding().getQName().getLocalPart());
>     >
>     > List operations = port.getBinding().getBindingOperations();
>     >
>     > for(Object operation : operations) {
>     >
>     > BindingOperation op = (BindingOperation) operation;
>     >
>     > System.out.print("    Operation Name: " + op.getName());
>     >
>     > List ll = op.getExtensibilityElements();
>     >
>     > for(Object soap : ll) {
>     >
>     > if(SOAPOperation.class.isInstance(soap)) {
>     >
>     > System.out.print(" (" + ((SOAPOperation)soap).getSoapActionURI()
>     + ")");
>     >
>     > }
>     >
>     > }
>     >
>     > System.out.println();
>     >
>     > }
>     >
>     > }
>     >
>     > }
>     >
>     > }
>     >
>     >
>     > Above code read remote wsdl, and extract its information.
>     >
>     > Regards,
>     > Sukma
>     >
>     > On Feb 17, 2008 2:09 PM, Demetris G <demetris@ece.neu.edu
>     <ma...@ece.neu.edu>
>     > <mailto:demetris@ece.neu.edu <ma...@ece.neu.edu>>> wrote:
>     >
>     >
>     >     Hi all,
>     >
>     >        I am trying to use the wsdlParser from the Axis API to parse
>     >     the methods
>     >     out of an incoming WSDL file - does anyone who has used this
>     >     before have
>     >     any info on how to use this tool? OR any other way I could
>     get the
>     >     operations
>     >     of the remote service out of the WSDL file? I would
>     appreciate it.
>     >
>     >     Thanks
>     >
>     >
>     >    
>     ---------------------------------------------------------------------
>     >     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     >     <mailto:axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>>
>     >     For additional commands, e-mail:
>     axis-user-help@ws.apache.org <ma...@ws.apache.org>
>     >     <mailto:axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>>
>     >
>     >
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: WSDL parser

Posted by Sukma Agung Verdianto <sa...@gmail.com>.
Hi Demetris,
To read a local file you could simply use "file:///path/to/wsdl/file.wsdl"
as readWSDL argument -> reader.readWSDL("file:///path/to/your/wsdl");,
Or if you have a WSDL serialized in String, you could use reader.readWSDL(
null, new InputSource(new StringReader(wsdlString)));

Regards,
Sukma

On Fri, Feb 22, 2008 at 1:22 PM, Demetris G <de...@ece.neu.edu> wrote:

>
> Hi all,
>
>    does anyone know of a piece of code similar to the one below that
> can read/parse  a local WSDL file
> serialized in a string rather than a remote WSDL given by a URI?
>
> Thanks
>
> Sukma Agung Verdianto wrote:
> > Hi Demetris,
> >
> > You can try to use wsdl4j (http://sourceforge.net/projects/wsdl4j) to
> > get the operations of specified wsdl file. (AFAIK, Axis2 uses this in
> > their wsdl2java code)
> >
> > public static void main(String[] args) throws Exception {
> >
> > WSDLFactory fac = WSDLFactoryImpl.newInstance();
> >
> > WSDLReader reader = fac.newWSDLReader();
> >
> > Definition def =
> > reader.readWSDL("http://api.google.com/GoogleSearch.wsdl");
> >
> > Map services = def.getServices();
> >
> > for(Object serviceKey : services.keySet()) {
> >
> > QName serviceQName = (QName) serviceKey;
> >
> > Service service = (Service) services.get(serviceQName);
> >
> > System.out.println("Namespace: " +
> > service.getQName().getNamespaceURI() + ", Service Name: " +
> > service.getQName().getLocalPart());
> >
> > Map ports = service.getPorts();
> >
> > for(Object portKey : ports.keySet()) {
> >
> > String portName = (String) portKey;
> >
> > Port port = (Port) ports.get(portName);
> >
> > System.out.println("  Namespace: " +
> > port.getBinding().getQName().getNamespaceURI() + ", Binding Name: " +
> > port.getBinding().getQName().getLocalPart());
> >
> > List operations = port.getBinding().getBindingOperations();
> >
> > for(Object operation : operations) {
> >
> > BindingOperation op = (BindingOperation) operation;
> >
> > System.out.print("    Operation Name: " + op.getName());
> >
> > List ll = op.getExtensibilityElements();
> >
> > for(Object soap : ll) {
> >
> > if(SOAPOperation.class.isInstance(soap)) {
> >
> > System.out.print(" (" + ((SOAPOperation)soap).getSoapActionURI() + ")");
> >
> > }
> >
> > }
> >
> > System.out.println();
> >
> > }
> >
> > }
> >
> > }
> >
> > }
> >
> >
> > Above code read remote wsdl, and extract its information.
> >
> > Regards,
> > Sukma
> >
> > On Feb 17, 2008 2:09 PM, Demetris G <demetris@ece.neu.edu
> > <ma...@ece.neu.edu>> wrote:
> >
> >
> >     Hi all,
> >
> >        I am trying to use the wsdlParser from the Axis API to parse
> >     the methods
> >     out of an incoming WSDL file - does anyone who has used this
> >     before have
> >     any info on how to use this tool? OR any other way I could get the
> >     operations
> >     of the remote service out of the WSDL file? I would appreciate it.
> >
> >     Thanks
> >
> >
> >
> ---------------------------------------------------------------------
> >     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> >     <ma...@ws.apache.org>
> >     For additional commands, e-mail: axis-user-help@ws.apache.org
> >     <ma...@ws.apache.org>
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: WSDL parser

Posted by Demetris G <de...@ece.neu.edu>.
Hi all,

    does anyone know of a piece of code similar to the one below that 
can read/parse  a local WSDL file
serialized in a string rather than a remote WSDL given by a URI?

Thanks

Sukma Agung Verdianto wrote:
> Hi Demetris,
>
> You can try to use wsdl4j (http://sourceforge.net/projects/wsdl4j) to 
> get the operations of specified wsdl file. (AFAIK, Axis2 uses this in 
> their wsdl2java code)
>
> public static void main(String[] args) throws Exception {
>
> WSDLFactory fac = WSDLFactoryImpl.newInstance();
>
> WSDLReader reader = fac.newWSDLReader();
>
> Definition def = 
> reader.readWSDL("http://api.google.com/GoogleSearch.wsdl");
>
> Map services = def.getServices();
>
> for(Object serviceKey : services.keySet()) {
>
> QName serviceQName = (QName) serviceKey;
>
> Service service = (Service) services.get(serviceQName);
>
> System.out.println("Namespace: " + 
> service.getQName().getNamespaceURI() + ", Service Name: " + 
> service.getQName().getLocalPart());
>
> Map ports = service.getPorts();
>
> for(Object portKey : ports.keySet()) {
>
> String portName = (String) portKey;
>
> Port port = (Port) ports.get(portName);
>
> System.out.println("  Namespace: " + 
> port.getBinding().getQName().getNamespaceURI() + ", Binding Name: " + 
> port.getBinding().getQName().getLocalPart());
>
> List operations = port.getBinding().getBindingOperations();
>
> for(Object operation : operations) {
>
> BindingOperation op = (BindingOperation) operation;
>
> System.out.print("    Operation Name: " + op.getName());
>
> List ll = op.getExtensibilityElements();
>
> for(Object soap : ll) {
>
> if(SOAPOperation.class.isInstance(soap)) {
>
> System.out.print(" (" + ((SOAPOperation)soap).getSoapActionURI() + ")");
>
> }
>
> }
>
> System.out.println();
>
> }
>
> }
>
> }
>
> }
>
>
> Above code read remote wsdl, and extract its information.
>
> Regards,
> Sukma
>
> On Feb 17, 2008 2:09 PM, Demetris G <demetris@ece.neu.edu 
> <ma...@ece.neu.edu>> wrote:
>
>
>     Hi all,
>
>        I am trying to use the wsdlParser from the Axis API to parse
>     the methods
>     out of an incoming WSDL file - does anyone who has used this
>     before have
>     any info on how to use this tool? OR any other way I could get the
>     operations
>     of the remote service out of the WSDL file? I would appreciate it.
>
>     Thanks
>
>
>     ---------------------------------------------------------------------
>     To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>     <ma...@ws.apache.org>
>     For additional commands, e-mail: axis-user-help@ws.apache.org
>     <ma...@ws.apache.org>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: WSDL parser

Posted by Sukma Agung Verdianto <sa...@gmail.com>.
Hi Demetris,
You can try to use wsdl4j (http://sourceforge.net/projects/wsdl4j) to get
the operations of specified wsdl file. (AFAIK, Axis2 uses this in their
wsdl2java code)

public static void main(String[] args) throws Exception {

WSDLFactory fac = WSDLFactoryImpl.newInstance();

WSDLReader reader = fac.newWSDLReader();

 Definition def = reader.readWSDL("http://api.google.com/GoogleSearch.wsdl"
);

 Map services = def.getServices();

for(Object serviceKey : services.keySet()) {

QName serviceQName = (QName) serviceKey;

Service service = (Service) services.get(serviceQName);

System.out.println("Namespace: " + service.getQName().getNamespaceURI() + ",
Service Name: " + service.getQName().getLocalPart());

 Map ports = service.getPorts();

for(Object portKey : ports.keySet()) {

String portName = (String) portKey;

Port port = (Port) ports.get(portName);

System.out.println("  Namespace: " +
port.getBinding().getQName().getNamespaceURI()
+ ", Binding Name: " + port.getBinding().getQName().getLocalPart());

 List operations = port.getBinding().getBindingOperations();

for(Object operation : operations) {

BindingOperation op = (BindingOperation) operation;

System.out.print("    Operation Name: " + op.getName());

List ll = op.getExtensibilityElements();

for(Object soap : ll) {

if(SOAPOperation.class.isInstance(soap)) {

System.out.print(" (" + ((SOAPOperation)soap).getSoapActionURI() + ")");

}

}

System.out.println();

}

}

}

}

Above code read remote wsdl, and extract its information.

Regards,
Sukma

On Feb 17, 2008 2:09 PM, Demetris G <de...@ece.neu.edu> wrote:

>
> Hi all,
>
>    I am trying to use the wsdlParser from the Axis API to parse the
> methods
> out of an incoming WSDL file - does anyone who has used this before have
> any info on how to use this tool? OR any other way I could get the
> operations
> of the remote service out of the WSDL file? I would appreciate it.
>
> Thanks
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>

Re: WSDL parser

Posted by Demetris G <de...@ece.neu.edu>.
Thanks Martin and Sukma - I will try the two methods you send me and see
how they work. I will share on the list the results on anything I find

Regards

Martin Gainty wrote:
> $AXIS2_HOME/bin/wsdl2java -uri NameOfWsdl.wsdl
>
> M-
> ----- Original Message -----
> From: "Demetris G" <de...@ece.neu.edu>
> To: <ax...@ws.apache.org>
> Sent: Sunday, February 17, 2008 2:09 AM
> Subject: WSDL parser
>
>
>   
>> Hi all,
>>
>>     I am trying to use the wsdlParser from the Axis API to parse the
>>     
> methods
>   
>> out of an incoming WSDL file - does anyone who has used this before have
>> any info on how to use this tool? OR any other way I could get the
>> operations
>> of the remote service out of the WSDL file? I would appreciate it.
>>
>> Thanks
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>
>>     
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>   

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: WSDL parser

Posted by Martin Gainty <mg...@hotmail.com>.
$AXIS2_HOME/bin/wsdl2java -uri NameOfWsdl.wsdl

M-
----- Original Message -----
From: "Demetris G" <de...@ece.neu.edu>
To: <ax...@ws.apache.org>
Sent: Sunday, February 17, 2008 2:09 AM
Subject: WSDL parser


>
> Hi all,
>
>     I am trying to use the wsdlParser from the Axis API to parse the
methods
> out of an incoming WSDL file - does anyone who has used this before have
> any info on how to use this tool? OR any other way I could get the
> operations
> of the remote service out of the WSDL file? I would appreciate it.
>
> Thanks
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


WSDL parser

Posted by Demetris G <de...@ece.neu.edu>.
Hi all,

    I am trying to use the wsdlParser from the Axis API to parse the methods
out of an incoming WSDL file - does anyone who has used this before have
any info on how to use this tool? OR any other way I could get the 
operations
of the remote service out of the WSDL file? I would appreciate it.

Thanks


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [axis2] Unexpected character 'E' (code 69) in prolog; expected '<'

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
Asankha,

I've created https://issues.apache.org/jira/browse/AXIS2-3496 for the
errors I've mentioned in my previous email.

Michele

On Fri, 2008-02-08 at 09:20 +0000, Michele Mazzucco wrote:
> On 7 Feb 2008, at 16:44, Asankha C. Perera wrote:
> 
> > Seems like you are receiving an HTML response to a SOAP query..
> >
> > This issue is fixed on the latest Synapse transport - but not  
> > available in the code of Axis2 1.3
> 
> 
> Asankha,
> 
> using tcmon I've found the message which generates the error
> 
> POST /axis2/services/StreamRoutingService HTTP/1.0
> Content-Type: application/soap+xml; charset=UTF-8;  
> action="urn:addStream"
> User-Agent: Axis2
> Host: *****:8081
> Content-Length: 574
> 
> <?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope  
> xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"  
> xmlns:wsa="http://www.w3.org/2005/08/ 
> addressing"><soapenv:Header><wsa:To>http://****:8081/axis2/services/ 
> StreamRoutingService</wsa:To><wsa:MessageID>urn:uuid: 
> 488847552774A643381202399230874</ 
> wsa:MessageID><wsa:Action>urn:addStream</wsa:Action></ 
> soapenv:Header><soapenv:Body><stream:addStream xmlns:stream="http:// 
> ncl.ac.uk/qosp"><service>ServiceOne</service><gamma>0.4</ 
> gamma><length>50</length></stream:addStream></soapenv:Body></ 
> soapenv:Envelope>
> 
> 
> HTTP/1.0 500 Internal Server Error
> Content-Type: text/xml
> Date: Thu, 07 Feb 2008 15:45:36 GMT
> Server: Axis2-HttpComponents-NIO
> Connection: Close
> 
> Error processing POST request
> 
> 
> 
> 
> Furthermore, but I don't know whether the two errors are related or  
> not, I've found this issue too
>   - Client side (using commons sender + NIO listener)
> 
> ERROR 21:53:44,422 (Callback.java:94) - Worker ServiceTwo stream 269
>       [java] org.apache.axis2.AxisFault: Transport error: 500 Error:  
> Internal Server Error
>       [java]     at  
> org.apache.axis2.transport.http.HTTPSender.handleResponse 
> (HTTPSender.java:293)
>       [java]     at  
> org.apache.axis2.transport.http.HTTPSender.sendViaPost 
> (HTTPSender.java:192)
>       [java]     at org.apache.axis2.transport.http.HTTPSender.send 
> (HTTPSender.java:77)
>       [java]     at  
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW 
> ithCommons(CommonsHTTPTransportSender.java:327)
>       [java]     at  
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke 
> (CommonsHTTPTransportSender.java:206)
>       [java]     at org.apache.axis2.engine.AxisEngine 
> $TransportNonBlockingInvocationWorker.run(AxisEngine.java:516)
>       [java]     at  
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
> $Worker.runTask(ThreadPoolExecutor.java:665)
>       [java]     at  
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
> $Worker.run(ThreadPoolExecutor.java:690)
>       [java]     at java.lang.Thread.run(Thread.java:613)
>       [java] ERROR 21:53:44,422 (Callback.java:94) - Worker  
> ServiceTwo stream 269
>       [java] org.apache.axis2.AxisFault: Transport error: 500 Error:  
> Internal Server Error
>       [java]     at  
> org.apache.axis2.transport.http.HTTPSender.handleResponse 
> (HTTPSender.java:293)
>       [java]     at  
> org.apache.axis2.transport.http.HTTPSender.sendViaPost 
> (HTTPSender.java:192)
>       [java]     at org.apache.axis2.transport.http.HTTPSender.send 
> (HTTPSender.java:77)
>       [java]     at  
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW 
> ithCommons(CommonsHTTPTransportSender.java:327)
>       [java]     at  
> org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke 
> (CommonsHTTPTransportSender.java:206)
>       [java]     at org.apache.axis2.engine.AxisEngine 
> $TransportNonBlockingInvocationWorker.run(AxisEngine.java:516)
>       [java]     at  
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
> $Worker.runTask(ThreadPoolExecutor.java:665)
>       [java]     at  
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
> $Worker.run(ThreadPoolExecutor.java:690)
>       [java]     at java.lang.Thread.run(Thread.java:613)
> 
> where Callback.java:94 is the onError() method of AxisCalback
> 
> 
> - Server side (using NIO sender/listener)
> ERROR 21:52:09,329 (ServerWorker.java:421) - Error processing POST  
> request
> org.apache.axis2.AxisFault: Service ServiceOne, stream not found for  
> cookie 269
>          at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
>          at org.apache.axis2.AxisFault.makeFault(AxisFault.java:406)
>          at  
> org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver.invokeBusinessLog 
> ic(RawXMLINOnlyMessageReceiver.java:94)
>          at org.apache.axis2.receivers.AbstractMessageReceiver.receive 
> (AbstractMessageReceiver.java:96)
>          at org.apache.axis2.engine.AxisEngine.receive 
> (AxisEngine.java:145)
>          at  
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReques 
> t(HTTPTransportUtils.java:275)
>          at org.apache.axis2.transport.nhttp.ServerWorker.processPost 
> (ServerWorker.java:207)
>          at org.apache.axis2.transport.nhttp.ServerWorker.run 
> (ServerWorker.java:171)
>          at  
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
> $Worker.runTask(ThreadPoolExecutor.java:665)
>          at  
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
> $Worker.run(ThreadPoolExecutor.java:690)
>          at java.lang.Thread.run(Thread.java:595)
> Caused by:  
> ncl.qosp.controller.policies.admission.streams.StreamNotFoundException:  
> Service ServiceOne, stream not found for cookie 269
>          at  
> ncl.qosp.controller.policies.admission.streams.State.getStream 
> (State.java:583)
>          at  
> ncl.qosp.controller.policies.admission.streams.State.arrival 
> (State.java:358)
>          at  
> ncl.qosp.controller.policies.admission.streams.StreamQueueImpl.queueIfNe 
> eded(StreamQueueImpl.java:337)
>          at  
> ncl.qosp.controller.service.streams.StreamServiceHandlerImpl.queue 
> (StreamServiceHandlerImpl.java:506)
>          at  
> ncl.qosp.controller.service.streams.StreamServiceHandlerImpl.queue 
> (StreamServiceHandlerImpl.java:49)
>          at  
> ncl.qosp.controller.dispatcher.streams.StreamDispatcherImpl.queue 
> (StreamDispatcherImpl.java:726)
>          at ncl.qosp.controller.streams.StreamRoutingService.forward 
> (StreamRoutingService.java:538)
>          at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
>          at sun.reflect.DelegatingMethodAccessorImpl.invoke 
> (DelegatingMethodAccessorImpl.java:25)
>          at java.lang.reflect.Method.invoke(Method.java:585)
>          at  
> org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver.invokeBusinessLog 
> ic(RawXMLINOnlyMessageReceiver.java:90)
>          ... 8 more
> 
> 
> 
> Michele
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [axis2] Unexpected character 'E' (code 69) in prolog; expected '<'

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
On 7 Feb 2008, at 16:44, Asankha C. Perera wrote:

> Seems like you are receiving an HTML response to a SOAP query..
>
> This issue is fixed on the latest Synapse transport - but not  
> available in the code of Axis2 1.3


Asankha,

using tcmon I've found the message which generates the error

POST /axis2/services/StreamRoutingService HTTP/1.0
Content-Type: application/soap+xml; charset=UTF-8;  
action="urn:addStream"
User-Agent: Axis2
Host: *****:8081
Content-Length: 574

<?xml version='1.0' encoding='UTF-8'?><soapenv:Envelope  
xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"  
xmlns:wsa="http://www.w3.org/2005/08/ 
addressing"><soapenv:Header><wsa:To>http://****:8081/axis2/services/ 
StreamRoutingService</wsa:To><wsa:MessageID>urn:uuid: 
488847552774A643381202399230874</ 
wsa:MessageID><wsa:Action>urn:addStream</wsa:Action></ 
soapenv:Header><soapenv:Body><stream:addStream xmlns:stream="http:// 
ncl.ac.uk/qosp"><service>ServiceOne</service><gamma>0.4</ 
gamma><length>50</length></stream:addStream></soapenv:Body></ 
soapenv:Envelope>


HTTP/1.0 500 Internal Server Error
Content-Type: text/xml
Date: Thu, 07 Feb 2008 15:45:36 GMT
Server: Axis2-HttpComponents-NIO
Connection: Close

Error processing POST request




Furthermore, but I don't know whether the two errors are related or  
not, I've found this issue too
  - Client side (using commons sender + NIO listener)

ERROR 21:53:44,422 (Callback.java:94) - Worker ServiceTwo stream 269
      [java] org.apache.axis2.AxisFault: Transport error: 500 Error:  
Internal Server Error
      [java]     at  
org.apache.axis2.transport.http.HTTPSender.handleResponse 
(HTTPSender.java:293)
      [java]     at  
org.apache.axis2.transport.http.HTTPSender.sendViaPost 
(HTTPSender.java:192)
      [java]     at org.apache.axis2.transport.http.HTTPSender.send 
(HTTPSender.java:77)
      [java]     at  
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW 
ithCommons(CommonsHTTPTransportSender.java:327)
      [java]     at  
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke 
(CommonsHTTPTransportSender.java:206)
      [java]     at org.apache.axis2.engine.AxisEngine 
$TransportNonBlockingInvocationWorker.run(AxisEngine.java:516)
      [java]     at  
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
$Worker.runTask(ThreadPoolExecutor.java:665)
      [java]     at  
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
$Worker.run(ThreadPoolExecutor.java:690)
      [java]     at java.lang.Thread.run(Thread.java:613)
      [java] ERROR 21:53:44,422 (Callback.java:94) - Worker  
ServiceTwo stream 269
      [java] org.apache.axis2.AxisFault: Transport error: 500 Error:  
Internal Server Error
      [java]     at  
org.apache.axis2.transport.http.HTTPSender.handleResponse 
(HTTPSender.java:293)
      [java]     at  
org.apache.axis2.transport.http.HTTPSender.sendViaPost 
(HTTPSender.java:192)
      [java]     at org.apache.axis2.transport.http.HTTPSender.send 
(HTTPSender.java:77)
      [java]     at  
org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageW 
ithCommons(CommonsHTTPTransportSender.java:327)
      [java]     at  
org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke 
(CommonsHTTPTransportSender.java:206)
      [java]     at org.apache.axis2.engine.AxisEngine 
$TransportNonBlockingInvocationWorker.run(AxisEngine.java:516)
      [java]     at  
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
$Worker.runTask(ThreadPoolExecutor.java:665)
      [java]     at  
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
$Worker.run(ThreadPoolExecutor.java:690)
      [java]     at java.lang.Thread.run(Thread.java:613)

where Callback.java:94 is the onError() method of AxisCalback


- Server side (using NIO sender/listener)
ERROR 21:52:09,329 (ServerWorker.java:421) - Error processing POST  
request
org.apache.axis2.AxisFault: Service ServiceOne, stream not found for  
cookie 269
         at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
         at org.apache.axis2.AxisFault.makeFault(AxisFault.java:406)
         at  
org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver.invokeBusinessLog 
ic(RawXMLINOnlyMessageReceiver.java:94)
         at org.apache.axis2.receivers.AbstractMessageReceiver.receive 
(AbstractMessageReceiver.java:96)
         at org.apache.axis2.engine.AxisEngine.receive 
(AxisEngine.java:145)
         at  
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReques 
t(HTTPTransportUtils.java:275)
         at org.apache.axis2.transport.nhttp.ServerWorker.processPost 
(ServerWorker.java:207)
         at org.apache.axis2.transport.nhttp.ServerWorker.run 
(ServerWorker.java:171)
         at  
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
$Worker.runTask(ThreadPoolExecutor.java:665)
         at  
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
$Worker.run(ThreadPoolExecutor.java:690)
         at java.lang.Thread.run(Thread.java:595)
Caused by:  
ncl.qosp.controller.policies.admission.streams.StreamNotFoundException:  
Service ServiceOne, stream not found for cookie 269
         at  
ncl.qosp.controller.policies.admission.streams.State.getStream 
(State.java:583)
         at  
ncl.qosp.controller.policies.admission.streams.State.arrival 
(State.java:358)
         at  
ncl.qosp.controller.policies.admission.streams.StreamQueueImpl.queueIfNe 
eded(StreamQueueImpl.java:337)
         at  
ncl.qosp.controller.service.streams.StreamServiceHandlerImpl.queue 
(StreamServiceHandlerImpl.java:506)
         at  
ncl.qosp.controller.service.streams.StreamServiceHandlerImpl.queue 
(StreamServiceHandlerImpl.java:49)
         at  
ncl.qosp.controller.dispatcher.streams.StreamDispatcherImpl.queue 
(StreamDispatcherImpl.java:726)
         at ncl.qosp.controller.streams.StreamRoutingService.forward 
(StreamRoutingService.java:538)
         at sun.reflect.GeneratedMethodAccessor43.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke 
(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at  
org.apache.axis2.receivers.RawXMLINOnlyMessageReceiver.invokeBusinessLog 
ic(RawXMLINOnlyMessageReceiver.java:90)
         ... 8 more



Michele


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: [axis2] Unexpected character 'E' (code 69) in prolog; expected '<'

Posted by "Asankha C. Perera" <as...@wso2.com>.
Seems like you are receiving an HTML response to a SOAP query..

This issue is fixed on the latest Synapse transport - but not available 
in the code of Axis2 1.3

asankha

Michele Mazzucco wrote:
> Hi again,
>
> some more information. The NPE is thrown both if the fault is created
> with an exception as argument or if the fault is created this way
> throw new AxisFault("Stream rejected");
>
> Michele
>
> On Thu, 2008-02-07 at 15:28 +0000, Michele Mazzucco wrote:
>   
>> Hello everybody,
>>
>> I'm getting this error on the client side
>>
>>   ERROR 15:16:40,047 (QueueController.java:200) - Unable to add  
>> stream for queue ServiceTwo,  
>> com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character  
>> 'E' (code 69) in prolog; expected '<'
>>       [java]  at [row,col {unknown-source}]: [1,1]
>>
>> This error is not new (see here http://mail-archives.apache.org/ 
>> mod_mbox/ws-axis-user/200707.mbox/%3C4688E9A1.8070808@wso2.com%3E for  
>> example)
>>
>> when an user exception is thrown on the server side. The servers log  
>> tells me about an error processing a POST request. The error occurs  
>> at ServerWorker:421 (I'm using the NIO listener/sender)
>>
>> ERROR 15:15:06,766 (ServerWorker.java:421) - Error processing POST  
>> request
>> org.apache.axis2.AxisFault:  
>> ncl.qosp.controller.policies.admission.streams.RejectedStreamException:  
>> Stream rejected 12
>>          at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
>>          at ncl.qosp.controller.streams.StreamRoutingService.addStream 
>> (StreamRoutingService.java:309)
>>          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>>          at sun.reflect.NativeMethodAccessorImpl.invoke 
>> (NativeMethodAccessorImpl.java:39)
>>          at sun.reflect.DelegatingMethodAccessorImpl.invoke 
>> (DelegatingMethodAccessorImpl.java:25)
>>          at java.lang.reflect.Method.invoke(Method.java:585)
>>          at  
>> org.apache.axis2.receivers.RawXMLINOutMessageReceiver.invokeBusinessLogi 
>> c(RawXMLINOutMessageReceiver.java:97)
>>          at  
>> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusine 
>> ssLogic(AbstractInOutSyncMessageReceiver.java:42)
>>          at org.apache.axis2.receivers.AbstractMessageReceiver.receive 
>> (AbstractMessageReceiver.java:96)
>>          at org.apache.axis2.engine.AxisEngine.receive 
>> (AxisEngine.java:145)
>>          at  
>> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReques 
>> t(HTTPTransportUtils.java:275)
>>          at org.apache.axis2.transport.nhttp.ServerWorker.processPost 
>> (ServerWorker.java:207)
>>          at org.apache.axis2.transport.nhttp.ServerWorker.run 
>> (ServerWorker.java:171)
>>          at  
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
>> $Worker.runTask(ThreadPoolExecutor.java:665)
>>          at  
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
>> $Worker.run(ThreadPoolExecutor.java:690)
>>          at java.lang.Thread.run(Thread.java:595)
>> Caused by:  
>> ncl.qosp.controller.policies.admission.streams.RejectedStreamException:  
>> ncl.qosp.controller.policies.admission.streams.RejectedStreamException:  
>> Stream rejected 12
>>          at  
>> ncl.qosp.controller.dispatcher.streams.StreamDispatcherImpl.addStream 
>> (StreamDispatcherImpl.java:363)
>>          at ncl.qosp.controller.streams.StreamRoutingService.addStream 
>> (StreamRoutingService.java:290)
>>          ... 14 more
>> Caused by:  
>> ncl.qosp.controller.policies.admission.streams.RejectedStreamException:  
>> Stream rejected 12
>>          at  
>> ncl.qosp.controller.dispatcher.streams.StreamEvaluatorTask.call 
>> (StreamEvaluatorTask.java:176)
>>          at  
>> ncl.qosp.controller.dispatcher.streams.StreamEvaluatorTask.call 
>> (StreamEvaluatorTask.java:37)
>>          at java.util.concurrent.FutureTask$Sync.innerRun 
>> (FutureTask.java:269)
>>          at java.util.concurrent.FutureTask.run(FutureTask.java:123)
>>          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask 
>> (ThreadPoolExecutor.java:650)
>>          at java.util.concurrent.ThreadPoolExecutor$Worker.run 
>> (ThreadPoolExecutor.java:675)
>>          ... 1 more
>> Exception in thread "HttpServerWorker-15" java.lang.NullPointerException
>>          at  
>> org.apache.axis2.transport.nhttp.ServerWorker.handleException 
>> (ServerWorker.java:441)
>>          at org.apache.axis2.transport.nhttp.ServerWorker.processPost 
>> (ServerWorker.java:214)
>>          at org.apache.axis2.transport.nhttp.ServerWorker.run 
>> (ServerWorker.java:171)
>>          at  
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
>> $Worker.runTask(ThreadPoolExecutor.java:665)
>>          at  
>> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
>> $Worker.run(ThreadPoolExecutor.java:690)
>>          at java.lang.Thread.run(Thread.java:595)
>>
>>
>>
>>  From the source code I understand that:
>> 1 - the output stream is null, or
>> 2 - the exception message is null
>>
>>
>> Any idea?
>>
>>
>> Thanks in advance,
>> Michele
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
>> For additional commands, e-mail: axis-user-help@ws.apache.org
>>
>>     
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>   

Re: [axis2] Unexpected character 'E' (code 69) in prolog; expected '<'

Posted by Michele Mazzucco <Mi...@ncl.ac.uk>.
Hi again,

some more information. The NPE is thrown both if the fault is created
with an exception as argument or if the fault is created this way
throw new AxisFault("Stream rejected");

Michele

On Thu, 2008-02-07 at 15:28 +0000, Michele Mazzucco wrote:
> Hello everybody,
> 
> I'm getting this error on the client side
> 
>   ERROR 15:16:40,047 (QueueController.java:200) - Unable to add  
> stream for queue ServiceTwo,  
> com.ctc.wstx.exc.WstxUnexpectedCharException: Unexpected character  
> 'E' (code 69) in prolog; expected '<'
>       [java]  at [row,col {unknown-source}]: [1,1]
> 
> This error is not new (see here http://mail-archives.apache.org/ 
> mod_mbox/ws-axis-user/200707.mbox/%3C4688E9A1.8070808@wso2.com%3E for  
> example)
> 
> when an user exception is thrown on the server side. The servers log  
> tells me about an error processing a POST request. The error occurs  
> at ServerWorker:421 (I'm using the NIO listener/sender)
> 
> ERROR 15:15:06,766 (ServerWorker.java:421) - Error processing POST  
> request
> org.apache.axis2.AxisFault:  
> ncl.qosp.controller.policies.admission.streams.RejectedStreamException:  
> Stream rejected 12
>          at org.apache.axis2.AxisFault.makeFault(AxisFault.java:417)
>          at ncl.qosp.controller.streams.StreamRoutingService.addStream 
> (StreamRoutingService.java:309)
>          at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>          at sun.reflect.NativeMethodAccessorImpl.invoke 
> (NativeMethodAccessorImpl.java:39)
>          at sun.reflect.DelegatingMethodAccessorImpl.invoke 
> (DelegatingMethodAccessorImpl.java:25)
>          at java.lang.reflect.Method.invoke(Method.java:585)
>          at  
> org.apache.axis2.receivers.RawXMLINOutMessageReceiver.invokeBusinessLogi 
> c(RawXMLINOutMessageReceiver.java:97)
>          at  
> org.apache.axis2.receivers.AbstractInOutSyncMessageReceiver.invokeBusine 
> ssLogic(AbstractInOutSyncMessageReceiver.java:42)
>          at org.apache.axis2.receivers.AbstractMessageReceiver.receive 
> (AbstractMessageReceiver.java:96)
>          at org.apache.axis2.engine.AxisEngine.receive 
> (AxisEngine.java:145)
>          at  
> org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostReques 
> t(HTTPTransportUtils.java:275)
>          at org.apache.axis2.transport.nhttp.ServerWorker.processPost 
> (ServerWorker.java:207)
>          at org.apache.axis2.transport.nhttp.ServerWorker.run 
> (ServerWorker.java:171)
>          at  
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
> $Worker.runTask(ThreadPoolExecutor.java:665)
>          at  
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
> $Worker.run(ThreadPoolExecutor.java:690)
>          at java.lang.Thread.run(Thread.java:595)
> Caused by:  
> ncl.qosp.controller.policies.admission.streams.RejectedStreamException:  
> ncl.qosp.controller.policies.admission.streams.RejectedStreamException:  
> Stream rejected 12
>          at  
> ncl.qosp.controller.dispatcher.streams.StreamDispatcherImpl.addStream 
> (StreamDispatcherImpl.java:363)
>          at ncl.qosp.controller.streams.StreamRoutingService.addStream 
> (StreamRoutingService.java:290)
>          ... 14 more
> Caused by:  
> ncl.qosp.controller.policies.admission.streams.RejectedStreamException:  
> Stream rejected 12
>          at  
> ncl.qosp.controller.dispatcher.streams.StreamEvaluatorTask.call 
> (StreamEvaluatorTask.java:176)
>          at  
> ncl.qosp.controller.dispatcher.streams.StreamEvaluatorTask.call 
> (StreamEvaluatorTask.java:37)
>          at java.util.concurrent.FutureTask$Sync.innerRun 
> (FutureTask.java:269)
>          at java.util.concurrent.FutureTask.run(FutureTask.java:123)
>          at java.util.concurrent.ThreadPoolExecutor$Worker.runTask 
> (ThreadPoolExecutor.java:650)
>          at java.util.concurrent.ThreadPoolExecutor$Worker.run 
> (ThreadPoolExecutor.java:675)
>          ... 1 more
> Exception in thread "HttpServerWorker-15" java.lang.NullPointerException
>          at  
> org.apache.axis2.transport.nhttp.ServerWorker.handleException 
> (ServerWorker.java:441)
>          at org.apache.axis2.transport.nhttp.ServerWorker.processPost 
> (ServerWorker.java:214)
>          at org.apache.axis2.transport.nhttp.ServerWorker.run 
> (ServerWorker.java:171)
>          at  
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
> $Worker.runTask(ThreadPoolExecutor.java:665)
>          at  
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor 
> $Worker.run(ThreadPoolExecutor.java:690)
>          at java.lang.Thread.run(Thread.java:595)
> 
> 
> 
>  From the source code I understand that:
> 1 - the output stream is null, or
> 2 - the exception message is null
> 
> 
> Any idea?
> 
> 
> Thanks in advance,
> Michele
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org