ik wrote:
> Hello,
>
> I'm trying to send a soap xml to a .net soap server using perl (why
> does .net have to use SOAP for such simple update ?! errr).
>
It doesn't have to.
> I found SOAP::Lite to be over complicated to my understanding, so I
> tried to use LWP instead.
> an example for what I'm doing is as follows:
>
> sub send_content
> {
> my $content = shift or return 0;
> my $ua = LWP::UserAgent->new;
> $ua->agent("WashingSOAP/0.1");
>
> # Create a request
> my $req = HTTP::Request->new(POST => 'http://...../');
> $req->header('SOAPAction' => '"http://tempuri.org/Save"');
> $req->content_type('application/soap+xml; charset=utf-8');
> #$req->content_type('text/xml; charset=utf-8');
> $req->content($content);
>
> # Pass request to the user agent and get a response back
> my $res = $ua->request($req);
>
> # Check the outcome of the response
> if ($res->is_success)
> {
> return $res->content;
> }
> else
> {
> return 0;
> }
> }
>
> I'm always having 500 error, and I wonder if anyone knows what am I
> missing (the XML I'm sending seems to be valid according to the .net
> people).
>
Would these be the .net people responsible for the server?
If so, could you ask them for some log that shows what happens when the
query reaches the server?
Is your XML message style or RPC style?
In the latter case, if you're miscalling the method, either by name or
by signature, it could be the cause of the error.
I don't think SOAP::Lite should be more complicated than generating your
own XML message, quite the contrary, it's not the only option in Perl.
There're also
SOAP::XML::Client
SOAP::XML::Client::Generic
SOAP::XML::Client::DotNet
Most of my experience was with SOAP::Lite and I haven't had a chance to
try those modules yet, but it might be worth your while to try that last
one.
> Thanks,
> Ido
>
--
Thanks,
Uri
http://translation.israel.net
Si fractum non sit, noli id reficere.
_______________________________________________
Perl mailing list
[email protected]
http://perl.org.il/mailman/listinfo/perl