Scott Hill wrote:
> On 7/31/07, *Kenneth Burgener* <[EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>> wrote:
> 
>     We are attempting to write a PHP SOAP client that will interface with
>     our Java SOAP server, but are experiencing difficulties when trying to
>     pass a byte array from our PHP SOAP client to the Java SOAP server.
> 
> 
> Some things that I have tried:
> 
> 1. Check the WSDL.  Look in the types section and find the complexType
> definition for the parameters you are passing.  You should eventually be
> able to drill down to a common XML type ( i.e. type="s:string").  Try to
> match the php variables that you are passing as parameters.

<complexType abstract="true" name="TheFile">
    <sequence>
     <element name="content" nillable="true" type="soapenc:base64Binary"/>
     <element name="contentType" nillable="true" type="soapenc:String"/>
     <element name="filename" nillable="true" type="soapenc:String"/>
     <element name="name" nillable="true" type="soapenc:String"/>
    </sequence>
</complexType>

Which would indicate that it should just be a base64 encoded binary
data.  So this should have worked, right?:

  $content = "hello world";
  $content = base64_encode($content);


> 2. Browse through the NuSoap source code and see if you can figure out
> how it breaks down those types and what the client class expects for
> those types.

A legit option, but not sure I have the expertise to break down the
NuSoap project to this level.


> 3.  It would be very advantageous if you could get some examples of
> actual (successful) web service call XML code that was passed back and
> forth.  To do this you will need some kind of sniffer software for the
> socket port that the web service is on.

I had this thought, but the traffic is being passed over SSL, so
Ethereal would only see encrypted garbage.


> Suggestions:
> 
> I have used NuSoap on the server side because they have WSDL
> capabilities.  However, I use the PHP5 soap client because it's easier
> to use and there isn't any third party setup or configurations. 

Ironically (or is it coincidentally?) we had the same thought, but we
were hoping to try to find a solution with NuSoap before we rewrite the
client.


_______________________________________________

UPHPU mailing list
UPHPU@uphpu.org
http://uphpu.org/mailman/listinfo/uphpu
IRC: #uphpu on irc.freenode.net

Reply via email to