Hi, I have changed the existing service changeOrderStatus(applications\order\servicedef\services.xml) to add export=true <service name="changeOrderStatus" engine="java" auth="true" location="org.ofbiz.order.order.OrderServices" invoke="setOrderStatus" export="true"> Please find attached the wsdl generated by ofbiz. On invoking this service from outside ofbiz , I am getting the following error: AxisFault faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException faultSubcode: faultString: org.xml.sax.SAXParseException: Content is not allowed in prolog. faultActor: faultNode: faultDetail: {http://xml.apache.org/axis/}stackTrace:org.xml.sax.SAXParseException: Content is not allowed in prolog. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(Unknown Source) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at org.apache.ofbiz.service.ChangeOrderStatusSoapBindingStub.changeOrderStatus(ChangeOrderStatusSoapBindingStub.java:120) at com.pj.netsuite.nsclient.OfbizPort.setOrderOnHold(OfbizPort.java:53) at com.pj.netsuite.nsclient.POListener.setPurchaseOrderStatus(POListener.java:242) at com.pj.netsuite.nsclient.POListener.updatePOStatus(POListener.java:178) at com.pj.netsuite.nsclient.POListener.onMessage(POListener.java:127) at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1021) at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:122) at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:192) at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122) at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) {http://xml.apache.org/axis/}hostname:a3-Prashant org.xml.sax.SAXParseException: Content is not allowed in prolog. at org.apache.axis.AxisFault.makeFault(AxisFault.java:101) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:701) at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206) at org.apache.axis.client.Call.invokeEngine(Call.java:2784) at org.apache.axis.client.Call.invoke(Call.java:2767) at org.apache.axis.client.Call.invoke(Call.java:2443) at org.apache.axis.client.Call.invoke(Call.java:2366) at org.apache.axis.client.Call.invoke(Call.java:1812) at org.apache.ofbiz.service.ChangeOrderStatusSoapBindingStub.changeOrderStatus(ChangeOrderStatusSoapBindingStub.java:120) at com.pj.netsuite.nsclient.OfbizPort.setOrderOnHold(OfbizPort.java:53) at com.pj.netsuite.nsclient.POListener.setPurchaseOrderStatus(POListener.java:242) at com.pj.netsuite.nsclient.POListener.updatePOStatus(POListener.java:178) at com.pj.netsuite.nsclient.POListener.onMessage(POListener.java:127) at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1021) at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:122) at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:192) at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122) at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog. at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at javax.xml.parsers.SAXParser.parse(Unknown Source) at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227) at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696) ... 21 more Regards, Prashant http://www.mindtree.com/email/disclaimer.html wsdl.zip (990 bytes) Download Attachment |
Hi Prashant
Check your OFBiz logs for signs of errors, they'll be of much more use in diagnosing the problem. Regards Scott HotWax Media http://www.hotwaxmedia.com On 16/11/2009, at 10:19 AM, Prashant Punekar wrote: > Hi, > > I have changed the existing service changeOrderStatus(applications > \order\servicedef\services.xml) to add export=true > > <service name="changeOrderStatus" engine="java" auth="true" > location="org.ofbiz.order.order.OrderServices" > invoke="setOrderStatus" export="true"> > > Please find attached the wsdl generated by ofbiz. > > On invoking this service from outside ofbiz , I am getting the > following error: > > AxisFault > faultCode: {http://schemas.xmlsoap.org/soap/ > envelope/}Server.userException > faultSubcode: > faultString: org.xml.sax.SAXParseException: Content is not allowed > in prolog. > faultActor: > faultNode: > faultDetail: > {http://xml.apache.org/ > axis/}stackTrace:org.xml.sax.SAXParseException: Content is not > allowed in prolog. > at > com > .sun > .org > .apache > .xerces > .internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown > Source) > at > com > .sun > .org > .apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown > Source) > at > com > .sun > .org > .apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown > Source) > at > com > .sun > .org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown > Source) > at > com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl > $PrologDriver.next(Unknown Source) > at > com > .sun > .org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown > Source) > at > com > .sun > .org > .apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown > Source) > at > com > .sun > .org > .apache > .xerces > .internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown > Source) > at > com > .sun > .org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown > Source) > at > com > .sun > .org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown > Source) > at > com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown > Source) > at > com > .sun > .org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown > Source) > at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl > $JAXPSAXParser.parse(Unknown Source) > at javax.xml.parsers.SAXParser.parse(Unknown Source) > at > org > .apache > .axis > .encoding.DeserializationContext.parse(DeserializationContext.java: > 227) > at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java: > 696) > at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) > at > org > .apache > .axis > .handlers > .soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) > at org.apache.axis.client.AxisClient.invoke(AxisClient.java: > 206) > at org.apache.axis.client.Call.invokeEngine(Call.java:2784) > at org.apache.axis.client.Call.invoke(Call.java:2767) > at org.apache.axis.client.Call.invoke(Call.java:2443) > at org.apache.axis.client.Call.invoke(Call.java:2366) > at org.apache.axis.client.Call.invoke(Call.java:1812) > at > org > .apache > .ofbiz > .service > .ChangeOrderStatusSoapBindingStub > .changeOrderStatus(ChangeOrderStatusSoapBindingStub.java:120) > at > com.pj.netsuite.nsclient.OfbizPort.setOrderOnHold(OfbizPort.java:53) > at > com > .pj > .netsuite.nsclient.POListener.setPurchaseOrderStatus(POListener.java: > 242) > at > com.pj.netsuite.nsclient.POListener.updatePOStatus(POListener.java: > 178) > at > com.pj.netsuite.nsclient.POListener.onMessage(POListener.java:127) > at > org > .apache > .activemq > .ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1021) > at > org > .apache > .activemq > .ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:122) > at > org > .apache > .activemq > .ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:192) > at > org > .apache > .activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122) > at org.apache.activemq.thread.PooledTaskRunner > $1.run(PooledTaskRunner.java:43) > at java.util.concurrent.ThreadPoolExecutor > $Worker.runTask(Unknown Source) > at java.util.concurrent.ThreadPoolExecutor > $Worker.run(Unknown Source) > at java.lang.Thread.run(Unknown Source) > > {http://xml.apache.org/axis/}hostname:a3-Prashant > > org.xml.sax.SAXParseException: Content is not allowed in prolog. > at org.apache.axis.AxisFault.makeFault(AxisFault.java:101) > at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java: > 701) > at org.apache.axis.Message.getSOAPEnvelope(Message.java:435) > at > org > .apache > .axis > .handlers > .soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62) > at org.apache.axis.client.AxisClient.invoke(AxisClient.java: > 206) > at org.apache.axis.client.Call.invokeEngine(Call.java:2784) > at org.apache.axis.client.Call.invoke(Call.java:2767) > at org.apache.axis.client.Call.invoke(Call.java:2443) > at org.apache.axis.client.Call.invoke(Call.java:2366) > at org.apache.axis.client.Call.invoke(Call.java:1812) > at > org > .apache > .ofbiz > .service > .ChangeOrderStatusSoapBindingStub > .changeOrderStatus(ChangeOrderStatusSoapBindingStub.java:120) > at > com.pj.netsuite.nsclient.OfbizPort.setOrderOnHold(OfbizPort.java:53) > at > com > .pj > .netsuite.nsclient.POListener.setPurchaseOrderStatus(POListener.java: > 242) > at > com.pj.netsuite.nsclient.POListener.updatePOStatus(POListener.java: > 178) > at > com.pj.netsuite.nsclient.POListener.onMessage(POListener.java:127) > at > org > .apache > .activemq > .ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:1021) > at > org > .apache > .activemq > .ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:122) > at > org > .apache > .activemq > .ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:192) > at > org > .apache > .activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122) > at org.apache.activemq.thread.PooledTaskRunner > $1.run(PooledTaskRunner.java:43) > at java.util.concurrent.ThreadPoolExecutor > $Worker.runTask(Unknown Source) > at java.util.concurrent.ThreadPoolExecutor > $Worker.run(Unknown Source) > at java.lang.Thread.run(Unknown Source) > Caused by: org.xml.sax.SAXParseException: Content is not allowed in > prolog. > at > com > .sun > .org > .apache > .xerces > .internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown > Source) > at > com > .sun > .org > .apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown > Source) > at > com > .sun > .org > .apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown > Source) > at > com > .sun > .org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown > Source) > at > com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl > $PrologDriver.next(Unknown Source) > at > com > .sun > .org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown > Source) > at > com > .sun > .org > .apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown > Source) > at > com > .sun > .org > .apache > .xerces > .internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown > Source) > at > com > .sun > .org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown > Source) > at > com > .sun > .org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown > Source) > at > com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown > Source) > at > com > .sun > .org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown > Source) > at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl > $JAXPSAXParser.parse(Unknown Source) > at javax.xml.parsers.SAXParser.parse(Unknown Source) > at > org > .apache > .axis > .encoding.DeserializationContext.parse(DeserializationContext.java: > 227) > at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java: > 696) > ... 21 more > > Regards, > Prashant > > http://www.mindtree.com/email/disclaimer.html > <wsdl.zip> smime.p7s (4K) Download Attachment |
In reply to this post by prashant punekar
Hi.
auth=true means that your service needs authentication. Try to add the login.username and login.password parameters in the call to the service. In my call to the web service I simply added the following, and it seems to work call.addParameter(login.username, org.apache.axis.Constants.XSD_STRING, javax.xml.rpc.ParameterMode.IN); call.addParameter(login.password, org.apache.axis.Constants.XSD_STRING, javax.xml.rpc.ParameterMode.IN); Regards. Louis Engelbrecht >>Hi, >>I have changed the existing service changeOrderStatus(applications\order\servicedef\services.xml) to add export=true >> <service name=changeOrderStatus engine=java auth=true >> location=org.ofbiz.order.order.OrderServices invoke=setOrderStatus export=true> -- This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard. The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html. This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. MailScanner thanks Transtec Computers for their support. |
Free forum by Nabble | Edit this page |