Connecting Tech Pros Worldwide Help | Site Map

SOAP interface query

 
LinkBack Thread Tools Search this Thread
  #1  
Old June 30th, 2006, 08:55 AM
Stephen
Guest
 
Posts: n/a
Default SOAP interface query

I've got a problem with a PHP program that i've written using the
standard SOAP client with a WSDL file.
When calling one of the functions on the SOAP server i'm occasionally
receiving a response containing a pound sign encoded as £. This
causes my program to report 'Looks like we got no XML document' and not
process the response.
The SOAP server is provided by a third party and appears to be Perl
SOAPLite. They insist that the pound is being encoded correctly.

I'm using PHP 5.1.4 from the command line running on Windows 2000.


Is there any way around this problem?


Thanks in advance,
Stephen


  #2  
Old June 30th, 2006, 10:45 AM
David Haynes
Guest
 
Posts: n/a
Default Re: SOAP interface query

Stephen wrote:[color=blue]
> I've got a problem with a PHP program that i've written using the
> standard SOAP client with a WSDL file.
> When calling one of the functions on the SOAP server i'm occasionally
> receiving a response containing a pound sign encoded as £. This
> causes my program to report 'Looks like we got no XML document' and not
> process the response.
> The SOAP server is provided by a third party and appears to be Perl
> SOAPLite. They insist that the pound is being encoded correctly.
>
> I'm using PHP 5.1.4 from the command line running on Windows 2000.
>
>
> Is there any way around this problem?
>
>
> Thanks in advance,
> Stephen
>[/color]
Stephen,
Try using nuSOAP instead. I know it's a bit of a pain to switch, but I
found nuSOAP works a little bit better with the perl SOAP implementation.

-david-

  #3  
Old June 30th, 2006, 10:55 AM
Stephen
Guest
 
Posts: n/a
Default Re: SOAP interface query


David Haynes wote:[color=blue]
> Stephen wrote:[color=green]
> > I've got a problem with a PHP program that i've written using the
> > standard SOAP client with a WSDL file.
> > When calling one of the functions on the SOAP server i'm occasionally
> > receiving a response containing a pound sign encoded as £. This
> > causes my program to report 'Looks like we got no XML document' and not
> > process the response.
> > The SOAP server is provided by a third party and appears to be Perl
> > SOAPLite. They insist that the pound is being encoded correctly.
> >
> > I'm using PHP 5.1.4 from the command line running on Windows 2000.
> >
> >
> > Is there any way around this problem?
> >
> >
> > Thanks in advance,
> > Stephen
> >[/color]
> Stephen,
> Try using nuSOAP instead. I know it's a bit of a pain to switch, but I
> found nuSOAP works a little bit better with the perl SOAP implementation.
>
> -david-[/color]


Thanks. I'll give nuSOAP a try.

regards,
Stephen

  #4  
Old July 3rd, 2006, 10:15 AM
Stephen
Guest
 
Posts: n/a
Default Re: SOAP interface query


Stephen wote:
Quote:
David Haynes wote:
Quote:
Stephen wrote:
Quote:
I've got a problem with a PHP program that i've written using the
standard SOAP client with a WSDL file.
When calling one of the functions on the SOAP server i'm occasionally
receiving a response containing a pound sign encoded as £. This
causes my program to report 'Looks like we got no XML document' and not
process the response.
The SOAP server is provided by a third party and appears to be Perl
SOAPLite. They insist that the pound is being encoded correctly.
>
I'm using PHP 5.1.4 from the command line running on Windows 2000.
>
>
Is there any way around this problem?
>
>
Thanks in advance,
Stephen
>
Stephen,
Try using nuSOAP instead. I know it's a bit of a pain to switch, but I
found nuSOAP works a little bit better with the perl SOAP implementation.

-david-
>
>
Thanks. I'll give nuSOAP a try.
>
regards,
Stephen
I've had a go with nuSOAP and i'm still having no joy. The function
call returns false when I try to bring back the request containing the
pound sign.

The offending line looks like this:

<commentText xsi:type="xsd:string">this is a &pound; pound
sign</commentText>

The xml headers on the response file are:

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

regards,
Stephen

  #5  
Old July 3rd, 2006, 10:45 AM
David Haynes
Guest
 
Posts: n/a
Default Re: SOAP interface query

Stephen wrote:
Quote:
Stephen wote:
Quote:
>David Haynes wote:
Quote:
>>Stephen wrote:
>>>I've got a problem with a PHP program that i've written using the
>>>standard SOAP client with a WSDL file.
>>>When calling one of the functions on the SOAP server i'm occasionally
>>>receiving a response containing a pound sign encoded as &pound;. This
>>>causes my program to report 'Looks like we got no XML document' and not
>>>process the response.
>>>The SOAP server is provided by a third party and appears to be Perl
>>>SOAPLite. They insist that the pound is being encoded correctly.
>>>>
>>>I'm using PHP 5.1.4 from the command line running on Windows 2000.
>>>>
>>>>
>>>Is there any way around this problem?
>>>>
>>>>
>>>Thanks in advance,
>>>Stephen
>>>>
>>Stephen,
>>Try using nuSOAP instead. I know it's a bit of a pain to switch, but I
>>found nuSOAP works a little bit better with the perl SOAP implementation.
>>>
>>-david-
>>
>Thanks. I'll give nuSOAP a try.
>>
>regards,
>Stephen
>
I've had a go with nuSOAP and i'm still having no joy. The function
call returns false when I try to bring back the request containing the
pound sign.
>
The offending line looks like this:
>
<commentText xsi:type="xsd:string">this is a &pound; pound
sign</commentText>
>
The xml headers on the response file are:
>
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>
regards,
Stephen
>
A couple of things to try then:
1. set encoding="iso-8859-1" instead of "UTF-8"
2. encode your pound sign as &#A3; or £

-david-

  #6  
Old July 3rd, 2006, 11:15 AM
Stephen
Guest
 
Posts: n/a
Default Re: SOAP interface query


David Haynes wote:
Quote:
Stephen wrote:
Quote:
Stephen wote:
Quote:
David Haynes wote:
>Stephen wrote:
>>I've got a problem with a PHP program that i've written using the
>>standard SOAP client with a WSDL file.
>>When calling one of the functions on the SOAP server i'm occasionally
>>receiving a response containing a pound sign encoded as &pound;. This
>>causes my program to report 'Looks like we got no XML document' and not
>>process the response.
>>The SOAP server is provided by a third party and appears to be Perl
>>SOAPLite. They insist that the pound is being encoded correctly.
>>>
>>I'm using PHP 5.1.4 from the command line running on Windows 2000.
>>>
>>>
>>Is there any way around this problem?
>>>
>>>
>>Thanks in advance,
>>Stephen
>>>
>Stephen,
>Try using nuSOAP instead. I know it's a bit of a pain to switch, but I
>found nuSOAP works a little bit better with the perl SOAP implementation.
>>
>-david-
>
Thanks. I'll give nuSOAP a try.
>
regards,
Stephen
I've had a go with nuSOAP and i'm still having no joy. The function
call returns false when I try to bring back the request containing the
pound sign.

The offending line looks like this:

<commentText xsi:type="xsd:string">this is a &pound; pound
sign</commentText>

The xml headers on the response file are:

<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">

regards,
Stephen
A couple of things to try then:
1. set encoding="iso-8859-1" instead of "UTF-8"
2. encode your pound sign as &#A3; or £
>
-david-
The second option would work if I could persuade the provider of the
SOAP server to change their code which is a no-goer unfortunately.
Is there a way of encoding the pound sign within the WSDL file on the
client side?

regards,
Stephen

  #7  
Old July 3rd, 2006, 01:45 PM
David Haynes
Guest
 
Posts: n/a
Default Re: SOAP interface query

Stephen wrote:
Quote:
David Haynes wote:
Quote:
>Stephen wrote:
Quote:
>>Stephen wote:
>>>David Haynes wote:
>>>>Stephen wrote:
>>>>>I've got a problem with a PHP program that i've written using the
>>>>>standard SOAP client with a WSDL file.
>>>>>When calling one of the functions on the SOAP server i'm occasionally
>>>>>receiving a response containing a pound sign encoded as &pound;. This
>>>>>causes my program to report 'Looks like we got no XML document' and not
>>>>>process the response.
>>>>>The SOAP server is provided by a third party and appears to be Perl
>>>>>SOAPLite. They insist that the pound is being encoded correctly.
>>>>>>
>>>>>I'm using PHP 5.1.4 from the command line running on Windows 2000.
>>>>>>
>>>>>>
>>>>>Is there any way around this problem?
>>>>>>
>>>>>>
>>>>>Thanks in advance,
>>>>>Stephen
>>>>>>
>>>>Stephen,
>>>>Try using nuSOAP instead. I know it's a bit of a pain to switch, but I
>>>>found nuSOAP works a little bit better with the perl SOAP implementation.
>>>>>
>>>>-david-
>>>Thanks. I'll give nuSOAP a try.
>>>>
>>>regards,
>>>Stephen
>>I've had a go with nuSOAP and i'm still having no joy. The function
>>call returns false when I try to bring back the request containing the
>>pound sign.
>>>
>>The offending line looks like this:
>>>
>><commentText xsi:type="xsd:string">this is a &pound; pound
>>sign</commentText>
>>>
>>The xml headers on the response file are:
>>>
>><?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope
>>xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
>>xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>>xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
>>>
>>regards,
>>Stephen
>>>
>A couple of things to try then:
>1. set encoding="iso-8859-1" instead of "UTF-8"
>2. encode your pound sign as &#A3; or £
>>
>-david-
>
The second option would work if I could persuade the provider of the
SOAP server to change their code which is a no-goer unfortunately.
Is there a way of encoding the pound sign within the WSDL file on the
client side?
>
regards,
Stephen
>
Not that I know of but I am not a SOAP/WSDL expert.

Just so you know, this issue is not unique to PHP. There are a whack of
posts in the various Java and SOAP forums about this problem.

The consensus seems to be that &pound; is only supported under certain
character encoding schemes and that specifying the encoding to
iso-8859-1 seems to help providing that the SOAP parser honours the
encoding attribute.

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.