Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Consuming Web Services

by Stegalex (Chaplain)
on Jun 06, 2005 at 14:26 UTC ( #463920=perlquestion: print w/replies, xml ) Need Help??

Stegalex has asked for the wisdom of the Perl Monks concerning the following question:

I will try not to make this a stupid question but I am on a project where just about everything is done in Java and there are no Perl people around to ask...

I have been asked to consume a SOAP web service that the java people are publishing (it's data from SAP for what it's worth). I am having a bit of trouble figuring out how to get started as there is no documentation. Here's what I know:

- I have a URL to a WSDL - There are some .xsd files

That's it! Can you help me to get started?

What I have tried so far is:
#!/usr/local/bin/perl -w use SOAP::Lite; $s = new SOAP::Lite -> service('https://myurl/services/BWReport');
which produces the crytic message:
junk after document element at line 2, column 0, byte 19 at /usr/local +/lib/perl5/site_perl/5.8.3/sun4-solaris/XML/Parser.pm line 187
Any help you can provide would be greatly appreciated.


~~~~~~~~~~~~~~~
I like chicken.

Replies are listed 'Best First'.
Re: Consuming Web Services
by gellyfish (Monsignor) on Jun 06, 2005 at 14:39 UTC

    The output from changing this to have:

    use SOAP::Lite +trace => 'all';
    will probably be enlightening.

    /J\

      Now it produces:
      SOAP::Transport::new: () SOAP::Serializer::new: () SOAP::Deserializer::new: () SOAP::Parser::new: () SOAP::Lite::new: () SOAP::Deserializer::new: () SOAP::Parser::new: () SOAP::Schema::new: () SOAP::Deserializer::deserialize: () SOAP::Parser::decode: () junk after document element at line 2, column 0, byte 19 at /usr/local +/lib/perl5/site_perl/5.8.3/sun4-solaris/XML/Parser.pm line 187 SOAP::Schema::DESTROY: () SOAP::Deserializer::DESTROY: () SOAP::Lite::DESTROY: () SOAP::Deserializer::DESTROY: () SOAP::Parser::DESTROY: () SOAP::Transport::DESTROY: () SOAP::Serializer::DESTROY: () SOAP::Parser::DESTROY: ()
      Did that tell me anything useful?


      ~~~~~~~~~~~~~~~
      I like chicken.
Re: Consuming Web Services
by jhourcle (Prior) on Jun 06, 2005 at 14:39 UTC

    Look at line 2, column 0, byte 19 of the WSDL file that you're trying to consume, because XML::Parser wasn't happy with it. If you need more info, try looking at line 187 of the file /usr/local/lib/perl5/site_perl/5.8.3/sun4-solaris/XML/Parser.pm.

    Update: or as gellyfish pointed out indirectly, it might be unhappy with line 2, column 0, byte 19 of the response from the SOAP message.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://463920]
Approved by virtualsue
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (6)
As of 2022-12-05 21:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?