axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdbr...@aub.nl
Subject Re: AXIS-PHP issue
Date Thu, 20 Oct 2005 14:31:15 GMT
Bugfixes for PEAR::SOAP

* REQUIRED CHANGES TO PEAR::SOAP SCRIPTS
 *
 * - In Client.php
 *
 *                 search for and comment out the line "$name =
$part['name'];"
 *
 * - In WDSL.php:
 *
 *                 set constant [WSDL_CACHE_USE = 1] to enable caching
(recommended!)
 *
 *                 search for and replace the line "if (strstr($key,
'xmlns:') != false) {"
 *                 by "if (strstr($key, 'xmlns:') != false && strstr($key,
'intf') ==
false) {"


> Hi,
>
> If you are using document/wrapped or document/literal, PEAR::SOAP has
> several bugs. I am doing this by heart some I cannot give you specific
> details:
>
> - PEAR::SOAP sets namespace incorrectly when using complex types. This can
> be fixed by commenting out something :-)
> - PEAR::SOAP incorrectly handles long values (it converts them to
> integers)
>
> To be shot: PEAR::SOAP has some issues.
>
> I cc'ed your issue to someone I know who has an fixed PEAR::SOAP package.
> he might be willing to help you out.
>
> Kind Regards,
>
> Bolke
>
>> Hi,
>> I am using PEAR:SOPA at client side to access hosted
>> web services, which is using AXIS(1.3).
>>
>> I am getting strange problem when accessing API which
>> takes one of the argument as NamedValue[],  whenever
>> trying to access these API server throws
>> NullPointerException. I am not sure what is going
>> wrong. The same API works fine when I use AXIS at
>> clien side.  It would be great help if you could help
>> to sort out this problem.
>> I tryed with PHP 4.3x and above, platform Linux
>>
>> Code Snippet:
>>
>> Custom NamedValue class:
>>
>> class NamedValue
>> {
>>   var $name;   // attribute name
>>   var $value;  // attribute value
>>
>>   function NamedValue($name, $value = null)
>>   {
>>    // $this->name = $name;
>>    // $this->value = $value;
>>    $this->name = new
>> SOAP_Value('name','string',$name);
>>    $this->value =  new SOAP_Value('value', '',
>> $value);
>>   }
>> }
>>
>> Invoke WS:
>>
>> $wsdlURL = $this->URL . '/foo/wsdl/' . $foo . '.wsdl';
>> $wsdl = new SOAP_WSDL( $wsdlURL);
>> $client = $wsdl->getProxy();
>> $folderdef = array (new NamedValue(Attributes::NAME(),
>> $name));
>> $wsid = new SOAP_Value('','long', 9595);
>> $newFolder = $fm_client->foo($wsid, $folderdef,
>> null);
>>
>>
>> Exception stack trace
>> faultString: java.lang.NullPointerException
>>  faultActor:
>>  faultNode:
>>  faultDetail:
>>
>> {http://xml.apache.org/axis/}stackTrace:java.lang.NullPointerException
>>         at
>> org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:310)
>>         at
>> org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
>>         at
>> org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
>>         at
>> org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1140)
>>         at
>> org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
>>         at
>> org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
>>         at
>> org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:148)
>>         at
>> org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:319)
>>         at
>> org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
>>         at
>> org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
>>         at
>> org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
>>         at
>> org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
>>         at
>> org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
>>         at
>> org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
>>         at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>>         at
>> org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
>>         at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>         at
>> com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
>>         at
>> oracle.security.jazn.oc4j.JAZNFilter.doFilter(Unknown
>> Source)
>>         at
>> com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
>>         at
>> oracle.ifs.fdk.http.HttpServerManager.doFilter(HttpServerManager.java:103)
>>         at
>> com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20)
>>         at
>> oracle.ifs.fdk.http.AxisSecurityFilter.doFilter(AxisSecurityFilter.java:83)
>>         at
>> com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:659)
>>         at
>> com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
>>         at
>> com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
>>         at
>> com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
>>         at
>> com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
>>         at
>> com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
>>         at java.lang.Thread.run(Thread.java:534)
>>
>>
>> java.lang.NullPointerException
>>         at
>> org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
>>         at
>> org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:329)
>>         at
>> org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
>>         at
>> org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:118)
>>         at
>> org.apache.axis.SimpleChain.invoke(SimpleChain.java:83)
>>         at
>> org.apache.axis.handlers.soap.SOAPService.invoke(SOAPService.java:453)
>>         at
>> org.apache.axis.server.AxisServer.invoke(AxisServer.java:281)
>>         at
>> org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:699)
>>         at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
>>         at
>> org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
>>         at
>> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>>         at
>> com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:65)
>>         at
>> com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:16)
>>         at
>> oracle.ifs.fdk.http.HttpServerManager.doFilter(HttpServerManager.java:103)
>>         at
>> com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:20)
>>         at
>>
>> com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:659)
>>         at
>> com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:330)
>>         at
>> com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:830)
>>         at
>> com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:224)
>>         at
>> com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:133)
>>         at
>> com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
>>         at java.lang.Thread.run(Thread.java:534)
>> Caused by: java.lang.NullPointerException
>>         at
>> org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeserializer.java:310)
>>         at
>> org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
>>         at
>> org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:165)
>>         at
>> org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:1140)
>>         at
>> org.apache.axis.message.RPCElement.deserialize(RPCElement.java:236)
>>         at
>> org.apache.axis.message.RPCElement.getParams(RPCElement.java:384)
>>         at
>> org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:148)
>>         at
>> org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:319)
>>
>>
>> XML Request
>>
>> <?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>
>>          <ns1:foo
>> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>> xmlns:ns1="URN">
>>             <destFolderId href="#id0"/>
>>             <attributes
>> soapenc:arrayType="ns1:NamedValue[2]"
>> xsi:type="soapenc:Array"
>> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
>>                <attributes href="#id1"/>
>>                <attributes href="#id2"/>
>>             </attributes>
>>             <attrequest
>> xsi:type="ns1:ArrayOfAttributeRequest"
>> xsi:nil="true"/>
>>          </ns1:foo>
>>          <multiRef id="id1" soapenc:root="0"
>> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>> xsi:type="ns2:NamedValue"
>> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
>> xmlns:ns2="URN">
>>             <name
>> xsi:type="soapenc:string">NAME</name>
>>             <value
>> xsi:type="soapenc:string">myNewFolder</value>
>>          </multiRef>
>>          <multiRef id="id0" soapenc:root="0"
>> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>> xsi:type="xsd:long"
>> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">9595</multiRef>
>>          <multiRef id="id2" soapenc:root="0"
>> soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
>> xsi:type="ns3:NamedValue" xmlns:ns3="URN"
>> xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/">
>>             <name
>> xsi:type="soapenc:string">DESCRIPTION</name>
>>             <value xsi:type="soapenc:string">a new
>> folder</value>
>>          </multiRef>
>>       </soapenv:Body>
>>
>>
>> Pleas do let me know if you need any further
>> informations.
>>
>> Thanks
>> Akl
>>
>>
>>
>> __________________________________
>> Yahoo! Music Unlimited
>> Access over 1 million songs. Try it free.
>> http://music.yahoo.com/unlimited/
>>
>
>
>


Mime
View raw message