FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Problem with webservice call: org.xml.sax.SAXException
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
Problem with webservice call: org.xml.sax.SAXException [message #180123] Thu, 10 January 2013 09:41 Go to next message
Jens Riedel is currently offline  Jens Riedel
Messages: 4
Registered: January 2013
Karma: 0
Junior Member
Hello,

after I migrated an existing web shop application from PHP 4 to PHP 5
(currently version 5.2.17) I had to upgrade the version of the PEAR
library "SOAP", which I use for webservice calls from 0.7.1 to 0.13.
Now I receive an error when I try to call a webservice I get the
following error message:

"org.xml.sax.SAXException: Invalid element in
de.mypayment.webservice.bean.KreditkarteBean - OBJTypeNS"

In the relevant class that should be base for the "KreditkarteBean" the
mentioned element is a variable declared as followed:

var $OBJTypeNS = array ('namespace' =>
'http://www.mypaymentprovider.de/ePayment' , 'type' => 'Kreditkarte');


Below this message is the stacktrace I get from the SOAP Fault object.

I appreciate any hint where the problem could be here; if you need more
information please let me know and I try to provide it.
(The original webservice is not accessible externally so I can't post
the URL here).

Kind regards
Jens


---------------------


org.xml.sax.SAXException: Invalid element in
de.mypayment.webservice.bean.KreditkarteBean - OBJTypeNS
at
org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer .java(Compiled
Code))
at
org.apache.axis.encoding.DeserializationContext.startElement(Deserializatio nContext.java(Compiled
Code))
at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java(Com piled
Code))
at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java (Inlined
Compiled Code))
at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java(Compiled
Code))
at org.apache.axis.message.RPCElement.getParams(RPCElement.java(Inlined
Compiled Code))
at
org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java( Compiled
Code))
at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java(Compil ed
Code))
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java (Compiled
Code))
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java(Compiled Code))
at org.apache.axis.SimpleChain.invoke(SimpleChain.java(Compiled Code))
at
org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java(Compiled
Code))
at org.apache.axis.server.AxisServer.invoke(AxisServer.java(Compiled Code))
at
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java(Compiled
Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java (Compiled
Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio nFilterChain.java(Compiled
Code))
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC hain.java(Compiled
Code))
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j ava(Compiled
Code))
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte xt.java(Compiled
Code))
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Comp iled
Code))
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContex tValve.java(Compiled
Code))
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j ava(Compiled
Code))
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte xt.java(Compiled
Code))
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Comp iled
Code))
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java(Co mpiled
Code))
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte xt.java(Compiled
Code))
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Co mpiled
Code))
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte xt.java(Compiled
Code))
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java(Compil ed
Code))
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte xt.java(Compiled
Code))
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Comp iled
Code))
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav a(Compiled
Code))
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte xt.java(Compiled
Code))
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Comp iled
Code))
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))

at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java(Compiled
Code))
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java(Compiled Code))

at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java(Compiled
Code))
at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java(Compiled
Code))
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java(Com piled
Code))
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.ja va:684)

at java.lang.Thread.run(Thread.java:571)
Re: Problem with webservice call: org.xml.sax.SAXException [message #180124 is a reply to message #180123] Thu, 10 January 2013 10:25 Go to previous messageGo to next message
M. Strobel is currently offline  M. Strobel
Messages: 386
Registered: December 2011
Karma: 0
Senior Member
Am 10.01.2013 10:41, schrieb Jens Riedel:
> Hello,
>
> after I migrated an existing web shop application from PHP 4 to PHP 5 (currently
> version 5.2.17) I had to upgrade the version of the PEAR library "SOAP", which I use
> for webservice calls from 0.7.1 to 0.13.
> Now I receive an error when I try to call a webservice I get the following error
> message:
>
> "org.xml.sax.SAXException: Invalid element in
> de.mypayment.webservice.bean.KreditkarteBean - OBJTypeNS"
>
> In the relevant class that should be base for the "KreditkarteBean" the mentioned
> element is a variable declared as followed:
>
> var $OBJTypeNS = array ('namespace' => 'http://www.mypaymentprovider.de/ePayment' ,
> 'type' => 'Kreditkarte');
>
>
> Below this message is the stacktrace I get from the SOAP Fault object.
>
> I appreciate any hint where the problem could be here; if you need more information
> please let me know and I try to provide it.
> (The original webservice is not accessible externally so I can't post the URL here).
---cut
>
> org.xml.sax.SAXException: Invalid element in
> de.mypayment.webservice.bean.KreditkarteBean - OBJTypeNS
> at
> org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer .java(Compiled
> Code))
---cut

It looks impossible to debug it this way.

I would trace the conversation with the error, trace a functioning conversation, find
the differences, find the cause of the differences.

Looks like a consulting job, it will probably require some serious set up and
instrumentation of your systems to get this info.

BTW you are upgrading from an ancient PHP version to an old PHP version.

/Str.
Re: Problem with webservice call: org.xml.sax.SAXException [message #180126 is a reply to message #180123] Thu, 10 January 2013 16:44 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 1/10/2013 4:41 AM, Jens Riedel wrote:
> Hello,
>
> after I migrated an existing web shop application from PHP 4 to PHP 5
> (currently version 5.2.17) I had to upgrade the version of the PEAR
> library "SOAP", which I use for webservice calls from 0.7.1 to 0.13.
> Now I receive an error when I try to call a webservice I get the
> following error message:
>
> "org.xml.sax.SAXException: Invalid element in
> de.mypayment.webservice.bean.KreditkarteBean - OBJTypeNS"
>
> In the relevant class that should be base for the "KreditkarteBean" the
> mentioned element is a variable declared as followed:
>
> var $OBJTypeNS = array ('namespace' =>
> 'http://www.mypaymentprovider.de/ePayment' , 'type' => 'Kreditkarte');
>
>
> Below this message is the stacktrace I get from the SOAP Fault object.
>
> I appreciate any hint where the problem could be here; if you need more
> information please let me know and I try to provide it.
> (The original webservice is not accessible externally so I can't post
> the URL here).
>
> Kind regards
> Jens
>
>
<snip>

Impossible to tell from the information given. You didn't show your
SOAP calls, the class you're trying to instantiate or the XML being
returned by the server.

But before you get off too far on this, the PEAR package is pretty much
defunct. The SOAP functions are now included in the base PHP code. You
should be using them instead.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Problem with webservice call: org.xml.sax.SAXException [message #180130 is a reply to message #180126] Thu, 10 January 2013 20:39 Go to previous messageGo to next message
Jens Riedel is currently offline  Jens Riedel
Messages: 4
Registered: January 2013
Karma: 0
Junior Member
Am 10.01.2013 17:44, schrieb Jerry Stuckle:

> Impossible to tell from the information given. You didn't show your
> SOAP calls, the class you're trying to instantiate or the XML being
> returned by the server.

Here is some more information:

the XML of my SOAP request:

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:ns4="KreditkartenzahlungWS"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<ns4:validierenKreditkarte>
<mandantNr xsi:type="xsd:string">12345678</mandantNr>
<kreditkarte>
<OBJTypeNS>
<namespace xsi:type="xsd:string">http://www.bff.bund.de/ePayment</namespace>
<type xsi:type="xsd:string">Kreditkarte</type></OBJTypeNS>
<karteninhaber xsi:type="xsd:string">Testname</karteninhaber>
<kreditkartenNr xsi:type="xsd:string">242342424234</kreditkartenNr>
<gueltigkeit xsi:type="xsd:string">01012050</gueltigkeit>
<kartenpruefnummer
xsi:type="xsd:string">666</kartenpruefnummer></kreditkarte>
<waehrungskennzeichen
xsi:type="xsd:string">EUR</waehrungskennzeichen></ns4:validierenKreditkarte >
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>


the following XML is returned from the server:

<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Server.userException</faultcode>
<faultstring>org.xml.sax.SAXException: Invalid element in
de.bund.bff.epayment.webservice.bean.KreditkarteBean -
OBJTypeNS</faultstring>
<detail>
<ns1:stackTrace
xmlns:ns1="http://xml.apache.org/axis/">org.xml.sax.SAXException:
Invalid element in de.bund.bff.epayment.webservice.bean.KreditkarteBean
- OBJTypeNS
at
org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer .java(Compiled
Code))
at
org.apache.axis.encoding.DeserializationContext.startElement(Deserializatio nContext.java(Compiled
Code))
at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java(Com piled
Code))
at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java (Inlined
Compiled Code))
at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java(Compiled
Code))
at org.apache.axis.message.RPCElement.getParams(RPCElement.java(Inlined
Compiled Code))
at
org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java( Compiled
Code))
at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java(Compil ed
Code))
at
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java (Compiled
Code))
at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java(Compiled Code))
at org.apache.axis.SimpleChain.invoke(SimpleChain.java(Compiled Code))
at
org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java(Compiled
Code))
at org.apache.axis.server.AxisServer.invoke(AxisServer.java(Compiled Code))
at
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java(Compiled
Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java (Compiled
Code))
at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled Code))
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio nFilterChain.java(Compiled
Code))
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC hain.java(Compiled
Code))
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j ava(Compiled
Code))
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte xt.java(Compiled
Code))
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Comp iled
Code))
at
org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContex tValve.java(Compiled
Code))
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j ava(Compiled
Code))
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte xt.java(Compiled
Code))
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Comp iled
Code))
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java(Co mpiled
Code))
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte xt.java(Compiled
Code))
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Co mpiled
Code))
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte xt.java(Compiled
Code))
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java(Compil ed
Code))
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte xt.java(Compiled
Code))
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Comp iled
Code))
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav a(Compiled
Code))
at
org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte xt.java(Compiled
Code))
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Comp iled
Code))
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java(Compiled
Code))
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java(Compiled Code))
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java(Compiled
Code))
at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java(Compiled Code))
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java(Com piled
Code))
at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.ja va:684)
at java.lang.Thread.run(Thread.java:571)
</ns1:stackTrace>
<ns2:hostname
xmlns:ns2="http://xml.apache.org/axis/">lxepyint</ns2:hostname>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>



> But before you get off too far on this, the PEAR package is pretty much
> defunct. The SOAP functions are now included in the base PHP code. You
> should be using them instead.

The problem is that the customer wants a solution with the least
migration effort and the webservice functionality with the PEAR SOAP lib
is used in a lot of places in the source code... but maybe it will be
cheaper in the long run to replace it with the PHP5 SOAP functions...

Kind regards
Jens
>
Re: Problem with webservice call: org.xml.sax.SAXException [message #180131 is a reply to message #180130] Thu, 10 January 2013 23:09 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 1/10/2013 3:39 PM, Jens Riedel wrote:
> Am 10.01.2013 17:44, schrieb Jerry Stuckle:
>
>> Impossible to tell from the information given. You didn't show your
>> SOAP calls, the class you're trying to instantiate or the XML being
>> returned by the server.
>
> Here is some more information:
>
> the XML of my SOAP request:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <SOAP-ENV:Envelope
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:ns4="KreditkartenzahlungWS"
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
> <SOAP-ENV:Body>
> <ns4:validierenKreditkarte>
> <mandantNr xsi:type="xsd:string">12345678</mandantNr>
> <kreditkarte>
> <OBJTypeNS>
> <namespace
> xsi:type="xsd:string">http://www.bff.bund.de/ePayment</namespace>
> <type xsi:type="xsd:string">Kreditkarte</type></OBJTypeNS>
> <karteninhaber xsi:type="xsd:string">Testname</karteninhaber>
> <kreditkartenNr xsi:type="xsd:string">242342424234</kreditkartenNr>
> <gueltigkeit xsi:type="xsd:string">01012050</gueltigkeit>
> <kartenpruefnummer
> xsi:type="xsd:string">666</kartenpruefnummer></kreditkarte>
> <waehrungskennzeichen
> xsi:type="xsd:string">EUR</waehrungskennzeichen></ns4:validierenKreditkarte >
>
> </SOAP-ENV:Body>
> </SOAP-ENV:Envelope>
>
>
> the following XML is returned from the server:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <soapenv:Envelope
> xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> <soapenv:Body>
> <soapenv:Fault>
> <faultcode>soapenv:Server.userException</faultcode>
> <faultstring>org.xml.sax.SAXException: Invalid element in
> de.bund.bff.epayment.webservice.bean.KreditkarteBean -
> OBJTypeNS</faultstring>
> <detail>
> <ns1:stackTrace
> xmlns:ns1="http://xml.apache.org/axis/">org.xml.sax.SAXException:
> Invalid element in de.bund.bff.epayment.webservice.bean.KreditkarteBean
> - OBJTypeNS
> at
> org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer .java(Compiled
> Code))
> at
> org.apache.axis.encoding.DeserializationContext.startElement(Deserializatio nContext.java(Compiled
> Code))
> at
> org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java(Com piled
> Code))
> at
> org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java (Inlined
> Compiled Code))
> at
> org.apache.axis.message.RPCElement.deserialize(RPCElement.java(Compiled
> Code))
> at
> org.apache.axis.message.RPCElement.getParams(RPCElement.java(Inlined
> Compiled Code))
> at
> org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java( Compiled
> Code))
> at
> org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java(Compil ed
> Code))
> at
> org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java (Compiled
> Code))
> at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java(Compiled
> Code))
> at org.apache.axis.SimpleChain.invoke(SimpleChain.java(Compiled Code))
> at
> org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java(Compiled
> Code))
> at
> org.apache.axis.server.AxisServer.invoke(AxisServer.java(Compiled Code))
> at
> org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java(Compiled
> Code))
> at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
> Code))
> at
> org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java (Compiled
> Code))
> at javax.servlet.http.HttpServlet.service(HttpServlet.java(Compiled
> Code))
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applicatio nFilterChain.java(Compiled
> Code))
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterC hain.java(Compiled
> Code))
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.j ava(Compiled
> Code))
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte xt.java(Compiled
> Code))
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Comp iled
> Code))
> at
> org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContex tValve.java(Compiled
> Code))
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.j ava(Compiled
> Code))
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte xt.java(Compiled
> Code))
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Comp iled
> Code))
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java(Co mpiled
> Code))
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte xt.java(Compiled
> Code))
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java(Co mpiled
> Code))
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte xt.java(Compiled
> Code))
> at
> org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java(Compil ed
> Code))
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte xt.java(Compiled
> Code))
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Comp iled
> Code))
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.jav a(Compiled
> Code))
> at
> org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveConte xt.java(Compiled
> Code))
> at
> org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java(Comp iled
> Code))
> at
> org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java(Compiled Code))
>
> at
> org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java(Compiled
> Code))
> at
> org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java(Compiled Code))
>
> at
> org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java(Compiled
> Code))
> at
> org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java(Compiled
> Code))
> at
> org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java(Com piled
> Code))
> at org.apache.jk.common.SocketConnection.runIt(ChannelSocket.java:866)
> at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.ja va:684)
>
> at java.lang.Thread.run(Thread.java:571)
> </ns1:stackTrace>
> <ns2:hostname
> xmlns:ns2="http://xml.apache.org/axis/">lxepyint</ns2:hostname>
> </detail>
> </soapenv:Fault>
> </soapenv:Body>
> </soapenv:Envelope>
>
>

OK, your XML looks fine. But it looks like the server doesn't
understand the OBJTypeNS at it's end. Is this what you had working
before? What does their API documentation say about it?

>
>> But before you get off too far on this, the PEAR package is pretty much
>> defunct. The SOAP functions are now included in the base PHP code. You
>> should be using them instead.
>
> The problem is that the customer wants a solution with the least
> migration effort and the webservice functionality with the PEAR SOAP lib
> is used in a lot of places in the source code... but maybe it will be
> cheaper in the long run to replace it with the PHP5 SOAP functions...
>
> Kind regards
> Jens
>>
>

Been there, done that, got (several) T-shirt(s) :)

Your biggest problem is the PEAR::SOAP package is no longer being
maintained. This *could* be a bug in the package, which will never be
fixed (there are currently 38 open bugs on the package but nothing I
could relate to your problem). It's also possible that a bug was fixed
between your (very) old version and the newer one, but again, a quick
look through the bugs didn't seem to indicate that. I admit I didn't
look closely at every bug, though.

You are going to have to convert sooner or later, or end up running
unsupported code forever. I know it's a hassle, but that will be
cheaper in the long run.

But if you need to get it going now, I'd go back and check the OBJTypeNS
in the API doc as I indicated above - what does the server expect?

I wish I could tell you more detail, but without the doc from the server
API and being unable to test myself, it's hard to make a solid
determination.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Problem with webservice call: org.xml.sax.SAXException [message #180156 is a reply to message #180130] Wed, 16 January 2013 14:12 Go to previous messageGo to next message
Thomas 'PointedEars'  is currently offline  Thomas 'PointedEars'
Messages: 701
Registered: October 2010
Karma: 0
Senior Member
Jens Riedel wrote:

> Am 10.01.2013 17:44, schrieb Jerry Stuckle:
>> Impossible to tell from the information given. You didn't show your
>> SOAP calls, the class you're trying to instantiate or the XML being
>> returned by the server.
>
> Here is some more information:

Which shows that, so far, you do not have a PHP problem:

> the XML of my SOAP request:
>
> […]
> <OBJTypeNS>
> <namespace
> xsi:type="xsd:string">http://www.bff.bund.de/ePayment</namespace> <type
> xsi:type="xsd:string">Kreditkarte</type></OBJTypeNS> […]
>
> the following XML is returned from the server:
>
> […]
> <faultcode>soapenv:Server.userException</faultcode>
> <faultstring>org.xml.sax.SAXException: Invalid element in
> de.bund.bff.epayment.webservice.bean.KreditkarteBean -
> OBJTypeNS</faultstring>
> <detail>
> <ns1:stackTrace
> xmlns:ns1="http://xml.apache.org/axis/">org.xml.sax.SAXException:
> Invalid element in de.bund.bff.epayment.webservice.bean.KreditkarteBean
> - OBJTypeNS
> at
>
org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer .java(Compiled
> Code))
> […]

You have an XML/SOAP or a Java problem. Your SOAP request message contains
an “OBJTypeNS” element that is either not recognized, or not allowed in this
context. If it is not recognized, then the Java code is at fault. If it is
not allowed (there), the XML/SOAP request message is at fault. The reason
of the latter would be that in some way you were at fault.

The problem is that unless you see the problem in your code, it is
impossible to tell with a sufficiently high probability for correctness what
could be the problem as you are still not posting the *relevant* (*PHP*)
code (that which generates the SOAP request message and issues the request
in the first place).

This is not a game where your readers would (like to) guess what you might
have done wrong.

--
PointedEars
Re: Problem with webservice call: org.xml.sax.SAXException [message #180159 is a reply to message #180156] Wed, 16 January 2013 16:24 Go to previous messageGo to next message
Jens Riedel is currently offline  Jens Riedel
Messages: 4
Registered: January 2013
Karma: 0
Junior Member
Am 16.01.2013 15:12, schrieb Thomas 'PointedEars' Lahn:

> Which shows that, so far, you do not have a PHP problem:

Meanwhile I found out the reason for the problem: the PEAR library SOAP
0.13 generates the content of the SOAP request in a different way as the
SOAP 0.7 did that we used before.
Due to this fact the OBJTypeNS tag appears in the request where it is
not expected/allowed on server side as it doesn't match the WSDL.

Currently I'm checking how I can replace the SOAP 0.13 library with the
PHP internal SOAP functions.

Regards
Jens
Re: Problem with webservice call: org.xml.sax.SAXException [message #180160 is a reply to message #180159] Wed, 16 January 2013 17:56 Go to previous messageGo to next message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma: 0
Senior Member
On 1/16/2013 11:24 AM, Jens Riedel wrote:
> Am 16.01.2013 15:12, schrieb Thomas 'PointedEars' Lahn:
>
>> Which shows that, so far, you do not have a PHP problem:
>
> Meanwhile I found out the reason for the problem: the PEAR library SOAP
> 0.13 generates the content of the SOAP request in a different way as the
> SOAP 0.7 did that we used before.
> Due to this fact the OBJTypeNS tag appears in the request where it is
> not expected/allowed on server side as it doesn't match the WSDL.
>
> Currently I'm checking how I can replace the SOAP 0.13 library with the
> PHP internal SOAP functions.
>
> Regards
> Jens
>

Jens,

What is the difference between the old and the new, as far as what was
received?

I'm concerned in that it looks like there was a bug in one of the two
versions of the PEAR SOAP library. If the bug is in the 0.7 version and
the 0.13 version is working correctly, you might have the same problem
when you convert to the internal PHP functions.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
Re: Problem with webservice call: org.xml.sax.SAXException [message #180161 is a reply to message #180160] Wed, 16 January 2013 21:08 Go to previous message
Jens Riedel is currently offline  Jens Riedel
Messages: 4
Registered: January 2013
Karma: 0
Junior Member
Am 16.01.2013 18:56, schrieb Jerry Stuckle:

> What is the difference between the old and the new, as far as what was
> received?
>
> I'm concerned in that it looks like there was a bug in one of the two
> versions of the PEAR SOAP library. If the bug is in the 0.7 version and
> the 0.13 version is working correctly, you might have the same problem
> when you convert to the internal PHP functions.

I analysed the parts of the 0.7 code where the special treatment of the
OBJTypeNS variable is implemented... when I compared it to a 0.7 version
I downloaded from PEAR I found that these parts have been added by the
developers who created our application some years ago (in 2003).
There's not a single comment or any documentation regarding these
extensions and no one seems to have wasted a thought about what happens
when this library will be updated one day...

So I would have to add this special code (after I understood what it
exactly does) to the 0.13 version again what is probably a bad solution.
I'll try to use the PHP 5 SOAP functions to get this clean...

Regards
Jens
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: QR Code>/phpqrcode/qrlib.php
Next Topic: PHP Opening!!
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Wed Dec 04 08:36:19 GMT 2024

Total time taken to generate the page: 0.02463 seconds