Skip to search.

Breaking News Visit Yahoo! News for the latest.

×Close this window

soaplite · SOAP::Lite for Perl (soaplite.com)

The Yahoo! Groups Product Blog

Check it out!

Group Information

  • Members: 1205
  • Category: Protocols
  • Founded: Jan 28, 2001
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

Advanced
Messages Help
Messages 4650 - 4679 of 6629   Oldest  |  < Older  |  Newer >  |  Newest
Messages: Show Message Summaries Sort by Date ^  
#4650 From: Duncan Cameron <duncan_cameron2002@...>
Date: Thu May 5, 2005 2:33 pm
Subject: Re: Re: Question using .NET wsdl file in perl client
duncan_camer...
Send Email Send Email
 
At 2005-05-05, 15:13:47 you wrote:

>> See this prior thread about using WSDL and getting the SOM object
>>
>> http://groups.yahoo.com/group/soaplite/message/4445
>>
>> Duncan
>
>Hi Duncan,
>
>Thanks for your note. I've tested the example from that thread and it
>works fine for validating a result or fault, but I'm still unable to
>iterate a complex object (the .NET dataset). Here's what I have now:
>
>#!/usr/bin/perl -w
>use SOAP::Lite +trace=>'debug';
>my $obj = SOAP::Lite
>        ->
>service('http://www.francisshanahan.com/TheHolyBible.asmx?wsdl');
>my $books = $obj->ListBooks();
>my $som = $obj->call;
>unless ($som->fault) {
>        print "result: ", $som->result, ' $books: ', $books, "\n";
>        for ($books->valueof('//bible_content')) {
>                print $_->BookTitle, "\n";
>        }
>}
>
>This is the output:
>
>result: HASH(0x85a3174) $books: HASH(0x85a3174)
>Can't call method "valueof" on unblessed reference at ./WSDLExample.pl
>line 9.
>
>The output verifies the $som->result and the original returned value
>($books) are the same HASH ref, but trying to use $books gets the
>unblessed error. Blessing it as a SOAP::SOM object removes the error,
>but doesn't do anything in the for loop. Is there another step I'm
>missing?
>
>Matthew
>
You need to access everything through the som object. In your case it
looks like the return value from Listbooks() does not give you
everything that you want.
Does this work for you?

unless ($som->fault) {
         print "result: ", $som->result, ' $books: ', $books, "\n";
         for ($som->valueof('//bible_content')) {
                 print $_->BookTitle, "\n";
         }
}

Duncan









___________________________________________________________
Yahoo! Messenger - want a free and easy way to contact your friends online?
http://uk.messenger.yahoo.com

#4651 From: "obc_spike" <obc_spike@...>
Date: Thu May 5, 2005 3:19 pm
Subject: Re: Question using .NET wsdl file in perl client
obc_spike
Send Email Send Email
 
> You need to access everything through the som object. In your case it
> looks like the return value from Listbooks() does not give you
> everything that you want.

Thanks for the help. My goal was the shorter WSDL notation, but still
being able to iterate individual items from the returned DataSet
(i.e., $_->BookTitle). The key was adding a deserializer. This code
works for me:

#!/usr/bin/perl -w
use SOAP::Lite;
my $obj = SOAP::Lite
         ->
service('http://www.francisshanahan.com/TheHolyBible.asmx?wsdl')
         -> deserializer(SOAP::Custom::XML::Deserializer->new);
my $books = $obj->ListBooks();
my $som = $obj->call;
unless ($som->fault) {
         for ($som->valueof('//bible_content')) {
                 print $_->BookTitle, "\n";
         }
}

Matthew

#4652 From: "adavisirl" <ad@...>
Date: Thu May 5, 2005 4:35 pm
Subject: Re: Can't use string ("as_anyURI") as a subroutine ref
adavisirl
Send Email Send Email
 
Hi Josh,
I'm sorry I can't help you yet, but I thought I'd let you know I'm
getting the same fault, but it depends on what platform I run the
client on.

My SOAP::Lite server, version 0.65, is on a SUN Solaris UNIX box
running perl 5.6.1. If I run the client on a similar SUN Solaris
box, I do not get the fault - all runs fine.
If I then run the same client on a Windows XP box, running perl 5.8.4,
I get the fault.

I'm trying to have the server return a URL as the body of a reply
to a query by the client. The fault goes away if I return a string
which is not a URL.

Will let you know if I find a fix...
Andrew


--- In soaplite@yahoogroups.com, "jmglov027" <josh.glover@t...> wrote:
>
> Long time lurker, first time poster here. Hullo to the group!
>
> I have been using SOAP::Lite for about a year and a half now, first
> 0.55, then 0.60. I just upgraded to 0.65_4 on a test box, and ran into
> major breakage. Making a SOAP call now results in the following fault:
>
> soap:Client (Can't use string ("as_anyURI") as a subroutine ref while
> "strict refs" in use at
> /usr/local/lib/perl5/site_perl/5.8.3/SOAP/Lite.pm line 1076. )
>
> I am running SOAP::Lite under Apache + mod_perl. Looking at my
> application logfiles, I can see that the SOAP call succeeds as far as
> the application is concerned, so the issue must be with serialisation
> of the result. I looked at line 1076 of SOAP/Lite.pm, but without some
> deep digging, I don't think I am going to be able to figure this one
> out.
>
> Does this ring any bells with anyone else on this list? (Especially
> Byrne and Pavel/Paul?)
>
> TIA,
> Josh

#4653 From: "Jay A. Kreibich" <jak@...>
Date: Thu May 5, 2005 4:57 pm
Subject: Re: Accessing HTTP Auth from a SOAP service
jaykreibich
Send Email Send Email
 
On Thu, May 05, 2005 at 01:22:39PM +1000, paul.hampson@... scratched on
the wall:
> On Tue, May 03, 2005 at 11:12:12PM -0500, Jay A. Kreibich wrote:
> > On Mon, May 02, 2005 at 01:41:13PM -0000, Paul TBBle Hampson scratched on
the wall:
> > > I'm creating a SOAP service which I want to
> > > username/password protect, against the database
> > > the service modifies.

> >   I would suggest you look at SOAP Headers, rather than HTTP headers.
>
> OK, fair point and well taken.
>
> I've found the '@ISA' thing that lets me pop the SOM out of @_ at the
> start of every function, so I'm guessing I just call ->headers on that,
> and skip happily through that array until I find the custom headers
> I've defined...

   I though that returned a hash ref, not an array, but you've got the right
   idea.  This is exactly what I'm doing with a large SOAP interface I'm
   building to front-end a database we run.

> So I guess the main thing is, do I have to worry about namespace
> clashes with other things using the SOAP Headers, or should I just define
> my own namespace? Of course, I'm not too clear on how the latter works.

   I'm not sure the headers have their own namespace.  While they are
   part of the SOAP spec, they aren't actually used by SOAP for
   anything.  They are more or less there for your own use and many many
   people use them for auth/auth info.  You might want to be a bit
   creative with your header names, just to be sure, but unless you
   define a header in your API or WSDL file, they generally won't be
   there.

   They aren't like HTTP headers where the protocol itself uses a bunch,
   so you have to be careful about clashes with "operational" headers.
   All SOAP headers are user-defined, although there might be a few
   client libs that insert "standard" (by their own definition) headers.

    -j

--
                      Jay A. Kreibich | CommTech, Emrg Net Tech Svcs
                         jak@... | Campus IT & Edu Svcs
           <http://www.uiuc.edu/~jak> | University of Illinois at U/C

#4654 From: "profhoward99" <howard@...>
Date: Thu May 5, 2005 5:07 pm
Subject: WSDL Generation with SOAP::Data / SOAP::Lite
profhoward99
Send Email Send Email
 
I've been mucking around with SOAP::Lite for a few days.  I need to create a
service and
have a WSDL file available for clients.  I've tried to use WSDL::Generator, but
it doesn't
seem to like it when I specifically specify server data types in SOAP::Lite
using SOAP::Data.

When I use SOAP::Data to 'type' my service return values, the WSDL::Generator
give me this
(as an example):

...
<xsd:complexType name="isRegisteredUserResponse">
-
	 <xsd:sequence>
<xsd:element name="_value" type="xsd:xsdl:myelement0"/>
<xsd:element name="_signature" type="xsd:string"/>
<xsd:element name="_type" type="xsd:string"/>
<xsd:element name="_attr" type="xsd:xsdl:myelement1"/>
<xsd:element name="_name" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
   <message name="isRegisteredUserResponse">
     <part name="result"         type="typens: isRegisteredUserResponse"/>
   </message>
...

when it should just be:

...
   <message name="isRegisteredUserResponse">
     <part name="isRegistered" type="xsd:boolean"/>
   </message>
...

my service method is:

sub isRegisteredUser {
	 my ($class, $license_string) = @_;
	 my $result = 0;
     my $license = License->new($license_string);
     $result = $license->isRegistered() if $license->isLoaded();
	 $result = SOAP::Data->type(boolean => $result || 0)->name('isRegistered');
	 return $result;
}

Is there any way to auto-generate SOAP::Lite services when using SOAP::Data to
strictly
'type' my return values?

Thanks,
Nathan

#4655 From: paul.hampson@...
Date: Fri May 6, 2005 6:31 am
Subject: Re: Accessing HTTP Auth from a SOAP service
tbble
Send Email Send Email
 
On Thu, May 05, 2005 at 11:57:08AM -0500, Jay A. Kreibich wrote:
> On Thu, May 05, 2005 at 01:22:39PM +1000, paul.hampson@... scratched on
the wall:
> > On Tue, May 03, 2005 at 11:12:12PM -0500, Jay A. Kreibich wrote:
> > > On Mon, May 02, 2005 at 01:41:13PM -0000, Paul TBBle Hampson scratched on
the wall:
> > > > I'm creating a SOAP service which I want to
> > > > username/password protect, against the database
> > > > the service modifies.
>
> > >   I would suggest you look at SOAP Headers, rather than HTTP headers.
> >
> > OK, fair point and well taken.
> >
> > I've found the '@ISA' thing that lets me pop the SOM out of @_ at the
> > start of every function, so I'm guessing I just call ->headers on that,
> > and skip happily through that array until I find the custom headers
> > I've defined...
>
>   I though that returned a hash ref, not an array, but you've got the right
>   idea.  This is exactly what I'm doing with a large SOAP interface I'm
>   building to front-end a database we run.

After futzing around, here's a public record of how I get the headers
at the server end, and how I do 'em in the client.
(Non-autodispatch, since I'm on perl 5.8.4 and couldn't find the
workaround again, after seeing it once.)

Server:
sub showenv {
         my $som = pop;
         my $returnlist;
         $returnlist = "Username: ".
$som->match(SOAP::SOM::header."/login")->valueof. "; password:
".$som->match(SOAP::SOM::header."/password")->valueof. ";";
         chomp $returnlist;
         return $returnlist;
}

Client: (This was the easy part. ^_^)
my $soapuser = SOAP::Header->new(name => 'login', value => 'user');
my $soappass = SOAP::Header->new(name => 'password', value => 'pass');
my $result = $soap->showenv($soapuser, $soappass);

This was arrived at largely thanks to a blog posting in the howto
link on the soaplite homepage about "forwarding headers" along with
a liberal application of Data::Dumper::Simple. ^_^

--
Paul "TBBle" Hampson, on an alternate email client.

#4656 From: "robertatelastica" <robert@...>
Date: Fri May 6, 2005 9:53 pm
Subject: Frustrated by timeout
robertatelas...
Send Email Send Email
 
So,

When you use service

as in

   use SOAP::Lite;
   print SOAP::Lite
     -> service('http://www.xmethods.net/sd/StockQuoteService.wsdl')
     -> getQuote('MSFT');

How can you specify the timeout that gets passed to the Transport?

#4657 From: Chris Nielsen <chris@...>
Date: Fri May 6, 2005 10:20 pm
Subject: Re: namespace/nesting problem: The Answer
zchris98119
Send Email Send Email
 
After more head-banging and a thoughtful reply from the auther of this
message: http://groups.yahoo.com/group/soaplite/message/2500 with a very
similar looking situation, it appears the answer is that Soap::Lite is not
well suited to the problem, and I am better off rolling my own. Joe
suggested templated output, and using XML Parser for getting back data.

So, it appears the answer is to give up on Soap::Lite for this application.

I'd love to hear from Soap::Lite users who have better ideas! :-)

It would appear that the Soap::Lite docs could benefit from haing some
information on where Soap::Lite is appropriate, and when it is not- to
save some of us many hours of frustration!

Cheers,
C

On Mon, 2 May 2005, Chris Nielsen wrote:

>
> Hi all...
> I didn't see this come to me from the list, so I'll try agian... If anyone
> has a hint several people will be most appreciative!
>
> The vast majority of Soap::Lite examples (all that I can recall) and other
> details seem to always have the simple <SOAP-ENV:Body>  type tag. However,
> it appears that my requirement is to modify that tag, and also to have 2
> non-nested namespaces like this:
>
> <SOAP-ENV:Body
> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:NS2="urn:SInfotype">
>     <NS1:AppMeta xmlns:NS1="urn:WidgetsincWSRV">
>         <metadata_a xsi:type="xsd:boolean">  </metadata_a>
>         <metadata_b xsi:type="xsd:string">   </metadata_b>
>         <AppDetail href="#1"/>
>     </NS1:AppMeta>
>     <NS2:AppDetail id="1" xsi:type="NS2:AppDetail">
>         <app_param_a xsi:type="xsd:string"> </app_param_a>
>         <app_param_b xsi:type="xsd:string"> </app_param_b>
>     </NS2:AppDetail>
> </SOAP-ENV:Body>
>
> About the closest so far is something like this - the required
> xmlns:NS2="urn:SInfotype" is not in the body tag, which I think has to do
> with NS2 being *inside* NS1, which is not correct.
>
> <SOAP-ENV:Body >
>   <NS1:AppMeta xmlns:NS1="urn:WidgetsincWSRV" xmlns:NS2="urn:SInfotype" >
>         <metadata_a xsi:type="xsd:boolean">  </metadata_a>
>         <metadata_b xsi:type="xsd:boolean">  </metadata_b>
>     <AppMeta_bogus>
>      <NS2:AppDetail >
>           <app_param_a xsi:type="xsd:string">    application data item 1
</app_param_a>
>           <app_param_b xsi:type="xsd:string">    application data item 1
</app_param_b>
>      </NS2:AppDetail>
>     </AppMeta_bogus>
>   </NS1:AppMeta>
> </SOAP-ENV:Body>
>
> This is sanitized somewhat of course, I hope I haven't introduced any
> errors.
>
> If anyone has ideas or knows if it is even possible to match control the
> body tag, and un-nest the namespace elements, thanks for posting or
> e-mailing ideas - or ideas on work arounds.
>
> Thanks all...
> -C
>
>
>
>

--
Christopher Nielsen    chris@...    http://ZORINco.com
______________________________________________________________
        Electronic Products  -  Consulting  -  Hosting

      C  O  N  T  R  O  L    Y  O  U  R    W  O  R  L  D

#4658 From: Byrne Reese <byrne@...>
Date: Sat May 7, 2005 3:45 pm
Subject: Re: namespace/nesting problem: The Answer
byrnereese
Send Email Send Email
 
In 0.60 and 0.65 there is a method call called "register_ns" which will
create a namespace and place its definition in the soap envelope. You
can specify a prefix or let SOAP::Lite generate one for you. If you need
to determine the prefix of an autogenerated namespace, then use the
find_ns subroutine.

SOAP::Data also lets you have complete and total control over the
namespaces, prefixes, attributes, and what have you.

Consider looking at the following resource for help:

http://www.majordojo.com/soaplite/

Chris Nielsen wrote:

>
> After more head-banging and a thoughtful reply from the auther of this
> message: http://groups.yahoo.com/group/soaplite/message/2500 with a very
> similar looking situation, it appears the answer is that Soap::Lite is
> not
> well suited to the problem, and I am better off rolling my own. Joe
> suggested templated output, and using XML Parser for getting back data.
>
> So, it appears the answer is to give up on Soap::Lite for this
> application.
>
> I'd love to hear from Soap::Lite users who have better ideas! :-)
>
> It would appear that the Soap::Lite docs could benefit from haing some
> information on where Soap::Lite is appropriate, and when it is not- to
> save some of us many hours of frustration!
>
> Cheers,
> C
>
> On Mon, 2 May 2005, Chris Nielsen wrote:
>
> >
> > Hi all...
> > I didn't see this come to me from the list, so I'll try agian... If
> anyone
> > has a hint several people will be most appreciative!
> >
> > The vast majority of Soap::Lite examples (all that I can recall) and
> other
> > details seem to always have the simple <SOAP-ENV:Body>  type tag.
> However,
> > it appears that my requirement is to modify that tag, and also to
> have 2
> > non-nested namespaces like this:
> >
>
> > <SOAP-ENV:Body
> > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
> xmlns:NS2="urn:SInfotype">
> >     <NS1:AppMeta xmlns:NS1="urn:WidgetsincWSRV">
> >         <metadata_a xsi:type="xsd:boolean">  </metadata_a>
> >         <metadata_b xsi:type="xsd:string">   </metadata_b>
> >         <AppDetail href="#1"/>
> >     </NS1:AppMeta>
> >     <NS2:AppDetail id="1" xsi:type="NS2:AppDetail">
> >         <app_param_a xsi:type="xsd:string"> </app_param_a>
> >         <app_param_b xsi:type="xsd:string"> </app_param_b>
> >     </NS2:AppDetail>
> > </SOAP-ENV:Body>
> >
>
> > About the closest so far is something like this - the required
> > xmlns:NS2="urn:SInfotype" is not in the body tag, which I think has
> to do
> > with NS2 being *inside* NS1, which is not correct.
> >
>
> > <SOAP-ENV:Body >
> >   <NS1:AppMeta xmlns:NS1="urn:WidgetsincWSRV"
> xmlns:NS2="urn:SInfotype" >
> >         <metadata_a xsi:type="xsd:boolean">  </metadata_a>
> >         <metadata_b xsi:type="xsd:boolean">  </metadata_b>
> >     <AppMeta_bogus>
> >      <NS2:AppDetail >
> >           <app_param_a xsi:type="xsd:string">    application data
> item 1 </app_param_a>
> >           <app_param_b xsi:type="xsd:string">    application data
> item 1 </app_param_b>
> >      </NS2:AppDetail>
> >     </AppMeta_bogus>
> >   </NS1:AppMeta>
> > </SOAP-ENV:Body>
> >
>
> > This is sanitized somewhat of course, I hope I haven't introduced any
> > errors.
> >
>
> > If anyone has ideas or knows if it is even possible to match control
> the
> > body tag, and un-nest the namespace elements, thanks for posting or
> > e-mailing ideas - or ideas on work arounds.
> >
> > Thanks all...
> > -C
> >
> >
> >
> >
>
> --
> Christopher Nielsen    chris@...    http://ZORINco.com
> ______________________________________________________________
>        Electronic Products  -  Consulting  -  Hosting
>
>      C  O  N  T  R  O  L    Y  O  U  R    W  O  R  L  D
>
>
>
>
>
>
>
> ------------------------------------------------------------------------
> *Yahoo! Groups Links*
>
>     * To visit your group on the web, go to:
>       http://groups.yahoo.com/group/soaplite/
>
>     * To unsubscribe from this group, send an email to:
>       soaplite-unsubscribe@yahoogroups.com
>       <mailto:soaplite-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>
>     * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>.
>
>

#4659 From: Robert Nicholson <robert@...>
Date: Sat May 7, 2005 7:01 pm
Subject: Document/Literal vs RPC/Encoded
robertatelas...
Send Email Send Email
 
Please note at work I'm using .55 release of soap lite.

I have a webservice that I access from weblogic that's registered as
RPC/Encoded and Document/Literal

ie. two different registrations each has a different name.

I can only get soaplite to talk to the Document/Literal registered
services.

Does that release of soaplite support RPC/Encoded?

#4660 From: jing han <jing_han_66@...>
Date: Mon May 9, 2005 1:50 pm
Subject: Problems with Access with service description
jing_han_66
Send Email Send Email
 
Hello,

I meet problem with accessing with service
description.

In my project, I have:

my
$service=SOAP::Lite->service('file:///myDir/my.wsdl');

Then later I need:
$service->Send(para1, para2);

Send is defined in my.wsdl file.

$service try to send para1 and para2 to a web services
server. If the web services server is running and
ready to communicate, $service->Send(para1, para2);
works fine. But when the web services server is not
running, $service->Send(para1, para2) crashes. Because
$service->Send(para1, para2) function runs in the
scope of an explictly created perl thread, the result
is that this perl thread dies.

I don't know why thread dies if connection cannot be
established. Is there anywhere in Lite.pm I should
look into?

Any help will be greately appreciated.


jing



__________________________________
Yahoo! Mail Mobile
Take Yahoo! Mail with you! Check email on your mobile phone.
http://mobile.yahoo.com/learn/mail

#4661 From: Byrne Reese <byrne@...>
Date: Mon May 9, 2005 2:43 pm
Subject: Re: Document/Literal vs RPC/Encoded
byrnereese
Send Email Send Email
 
That is surprising actually - not impossible, but surprising.

In .55 doc/lit support was severely limited. rpc/encoded was the default...

0.65 has much better WSDL support however - across the board.

Robert Nicholson wrote:

> Please note at work I'm using .55 release of soap lite.
>
> I have a webservice that I access from weblogic that's registered as
> RPC/Encoded and Document/Literal
>
> ie. two different registrations each has a different name.
>
> I can only get soaplite to talk to the Document/Literal registered
> services.
>
> Does that release of soaplite support RPC/Encoded?
>
> ------------------------------------------------------------------------
> *Yahoo! Groups Links*
>
>     * To visit your group on the web, go to:
>       http://groups.yahoo.com/group/soaplite/
>
>     * To unsubscribe from this group, send an email to:
>       soaplite-unsubscribe@yahoogroups.com
>       <mailto:soaplite-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>
>     * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>.
>
>

#4662 From: "drewonhoo" <drewonhoo@...>
Date: Mon May 9, 2005 10:01 pm
Subject: Deciphering a blessed SOAP::Lite Data Structure
drewonhoo
Send Email Send Email
 
Greetings,

I am trying to access the data in the data structure below.  I can
get it to give me the value of the 'inode', but haven't had any luck
getting at the other elements.

This code always prints 4168:

my $gettestresult = $result->name('getTestResult')->value();
my $test_array = ${$gettestresult};
my $test_record = $test_array->value();
my $name = $test_record->name('name')->value();

print "$name\n";

Thanks for any help,
Drew.

INSTALLATION INFO
-----------------
SOAP::Lite 0.65 on Linux xxx 2.4.20-20.8 #1 Mon Aug 18 14:59:07 EDT
2003 i686 i686 i386 GNU/Linux

DATASTRUCTURE (from Data::Dumper)
-------------
$VAR1 = bless( {
      '_name' => 'getTestResult',
      '_signature' => [],
      '_value' => [
            \bless( {
                   '_name' => 'TestRecord',
                   '_type' => 'TestRecord',
                   '_signature' => [],
                   '_value' => [
                         bless( {
                                  '_name' => 'inode',
                                  '_type' => 'int',
                                  '_signature' => [],
                                  '_value' => [
                                                '4168'
                                              ],
                                  '_attr' => {}
                                }, 'SOAP::Data' ),
                         bless( {
                                  '_name' => 'name',
                                  '_type' => 'string',
                                  '_signature' => [],
                                  '_value' => [
                                                'this is a test'
                                              ],
                                  '_attr' => {}
                                }, 'SOAP::Data' ),
                         bless( {
                                  '_name' => 'creation_time',
                                  '_type' => 'int',
                                  '_signature' => [],
                                  '_value' => [
                                                '1115674310'
                                              ],
                                  '_attr' => {}
                                }, 'SOAP::Data' ),
                         bless( {
                                  '_name' => 'modification_time',
                                  '_type' => 'int',
                                  '_signature' => [],
                                  '_value' => [
                                                '1115674311'
                                              ],
                                  '_attr' => {}
                                }, 'SOAP::Data' )
                       ],
                   '_attr' => {}
                 }, 'SOAP::Data' )
          ],
      '_attr' => {}
    }, 'SOAP::Data' );

#4663 From: Chris Nielsen <chris@...>
Date: Tue May 10, 2005 4:15 am
Subject: Re: namespace/nesting problem: The Answer
zchris98119
Send Email Send Email
 
Thanks Byrne for the response.

I'm not sure if I'm understanding correctly, but it's the <Body>
tag that needs to change, not the envelope. And from the only docs I found
(the single paragraph on the cpan page) it looks like it's the envelope
that is modified by register_ns, not the body tag. Apologies if I'm
missing something fundamental. It could be I'm not doing this correctly
but what I did was add something like:

     $soap->serializer->register_ns('xmlns:NS2','urn:SInfotype');

I don't see the the body tag change as a result. What I do see is a change
change in the soap:Envelope tag,

If anyone can post or refer to an example where the body tag looks like
the example below (with the NS def), and the NS1 and NS2 sections are
parallel inside the body, or have other ideas, I'll be happy to try that.
I just haven't seen any way to meet the requirement without writing the
xml manually.

Thanks,
C



On Sat, 7 May 2005, Byrne Reese wrote:

> In 0.60 and 0.65 there is a method call called "register_ns" which will
> create a namespace and place its definition in the soap envelope. You
> can specify a prefix or let SOAP::Lite generate one for you. If you need
> to determine the prefix of an autogenerated namespace, then use the
> find_ns subroutine.
>
> SOAP::Data also lets you have complete and total control over the
> namespaces, prefixes, attributes, and what have you.
>
> Consider looking at the following resource for help:
>
> http://www.majordojo.com/soaplite/
>
> Chris Nielsen wrote:
>
> > > <SOAP-ENV:Body xmlns:NS2="urn:SInfotype">
> > >     <NS1:AppMeta xmlns:NS1="urn:WidgetsincWSRV">
> > >         <metadata_a xsi:type="xsd:boolean">  </metadata_a>
> > >         <metadata_b xsi:type="xsd:string">   </metadata_b>
> > >         <AppDetail href="#1"/>
> > >     </NS1:AppMeta>
> > >     <NS2:AppDetail id="1" xsi:type="NS2:AppDetail">
> > >         <app_param_a xsi:type="xsd:string"> </app_param_a>
> > >         <app_param_b xsi:type="xsd:string"> </app_param_b>
> > >     </NS2:AppDetail>
> > > </SOAP-ENV:Body>





--
Christopher Nielsen    chris@...    http://ZORINco.com
______________________________________________________________
        Electronic Products  -  Consulting  -  Hosting

      C  O  N  T  R  O  L    Y  O  U  R    W  O  R  L  D

#4664 From: Byrne Reese <byrne@...>
Date: Tue May 10, 2005 5:16 am
Subject: Re: namespace/nesting problem: The Answer
byrnereese
Send Email Send Email
 
Check out http://www.majordojo.com/soaplite/ which contains a HOWTO on
overriding the SOAP Body of a request message.

Chris Nielsen wrote:

>
> Thanks Byrne for the response.
>
> I'm not sure if I'm understanding correctly, but it's the <Body>
> tag that needs to change, not the envelope. And from the only docs I found
> (the single paragraph on the cpan page) it looks like it's the envelope
> that is modified by register_ns, not the body tag. Apologies if I'm
> missing something fundamental. It could be I'm not doing this correctly
> but what I did was add something like:
>
>     $soap->serializer->register_ns('xmlns:NS2','urn:SInfotype');
>
> I don't see the the body tag change as a result. What I do see is a
> change
> change in the soap:Envelope tag,
>
> If anyone can post or refer to an example where the body tag looks like
> the example below (with the NS def), and the NS1 and NS2 sections are
> parallel inside the body, or have other ideas, I'll be happy to try
> that.
> I just haven't seen any way to meet the requirement without writing the
> xml manually.
>
> Thanks,
> C
>
>
>
> On Sat, 7 May 2005, Byrne Reese wrote:
>
> > In 0.60 and 0.65 there is a method call called "register_ns" which will
> > create a namespace and place its definition in the soap envelope. You
> > can specify a prefix or let SOAP::Lite generate one for you. If you
> need
> > to determine the prefix of an autogenerated namespace, then use the
> > find_ns subroutine.
> >
> > SOAP::Data also lets you have complete and total control over the
> > namespaces, prefixes, attributes, and what have you.
> >
> > Consider looking at the following resource for help:
> >
> > http://www.majordojo.com/soaplite/
> >
> > Chris Nielsen wrote:
> >
> > > > <SOAP-ENV:Body xmlns:NS2="urn:SInfotype">
> > > >     <NS1:AppMeta xmlns:NS1="urn:WidgetsincWSRV">
> > > >         <metadata_a xsi:type="xsd:boolean">  </metadata_a>
> > > >         <metadata_b xsi:type="xsd:string">   </metadata_b>
> > > >         <AppDetail href="#1"/>
> > > >     </NS1:AppMeta>
> > > >     <NS2:AppDetail id="1" xsi:type="NS2:AppDetail">
> > > >         <app_param_a xsi:type="xsd:string"> </app_param_a>
> > > >         <app_param_b xsi:type="xsd:string"> </app_param_b>
> > > >     </NS2:AppDetail>
> > > > </SOAP-ENV:Body>
>
>
>
>
>
> --
> Christopher Nielsen    chris@...    http://ZORINco.com
> ______________________________________________________________
>        Electronic Products  -  Consulting  -  Hosting
>
>      C  O  N  T  R  O  L    Y  O  U  R    W  O  R  L  D
>
>
>
>
> ------------------------------------------------------------------------
> *Yahoo! Groups Links*
>
>     * To visit your group on the web, go to:
>       http://groups.yahoo.com/group/soaplite/
>
>     * To unsubscribe from this group, send an email to:
>       soaplite-unsubscribe@yahoogroups.com
>       <mailto:soaplite-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>
>     * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>.
>
>

#4665 From: "jiesheng zhang" <jasonnew2001@...>
Date: Wed May 11, 2005 3:53 am
Subject: pre set Authorization header
jasonnew2001
Send Email Send Email
 
Hi, all
To access the protected resource using basic authenticatiom, the soap
client only sends the username/password when the server chanllenge the
client with a 401 response. The end  result is for for every request,
two round-trips are needed. The first request gets a 401 response. The
second with the Authorization header gets the result back. This is
ineffecient. Mozilla in this case presets the Authorization header to
avoid the chanllenge request-response.

Is there way to do this in the soap::lite?

Thanks

--jason

#4666 From: Chris Nielsen <chris@...>
Date: Wed May 11, 2005 11:06 pm
Subject: Re: namespace/nesting problem: The Answer
zchris98119
Send Email Send Email
 
Hi Byrne,

If you have a link to the howto, I'll be happy to check it out, but I
couldn't find it on majordojo.com. I searched for "howto", There was one
for nesting but the body tag is simple, not what I'm looking for. BTW,
there is a link to an article "SOAP::Lite Client HOWTO" (soapenv.org) but
that brings up a "this page parked free, courtesy of godaddy.com".
Googling for "SOAP::Lite Client HOWTO" didn't get anything. Searching
majordojo for "register_ns" responded 'no pages found'...

Anyway, I'll be glad to check anything you think relevant, and if
something I'm doing is screwy please let me know.

Thanks,
-C



On Mon, 9 May 2005, Byrne Reese wrote:

> Check out http://www.majordojo.com/soaplite/ which contains a HOWTO on
> overriding the SOAP Body of a request message.
>
> Chris Nielsen wrote:
>
> >
> > Thanks Byrne for the response.
> >
> > I'm not sure if I'm understanding correctly, but it's the <Body>
> > tag that needs to change, not the envelope. And from the only docs I found
> > (the single paragraph on the cpan page) it looks like it's the envelope
> > that is modified by register_ns, not the body tag. Apologies if I'm
> > missing something fundamental. It could be I'm not doing this correctly
> > but what I did was add something like:
> >
> >     $soap->serializer->register_ns('xmlns:NS2','urn:SInfotype');
> >
> > I don't see the the body tag change as a result. What I do see is a
> > change
> > change in the soap:Envelope tag,
> >
> > If anyone can post or refer to an example where the body tag looks like
> > the example below (with the NS def), and the NS1 and NS2 sections are
> > parallel inside the body, or have other ideas, I'll be happy to try
> > that.
> > I just haven't seen any way to meet the requirement without writing the
> > xml manually.
> >
> > Thanks,
> > C



--
Christopher Nielsen    chris@...    http://ZORINco.com
______________________________________________________________
        Electronic Products  -  Consulting  -  Hosting

      C  O  N  T  R  O  L    Y  O  U  R    W  O  R  L  D

#4667 From: "David Inglis" <david.inglis@...>
Date: Thu May 12, 2005 6:32 am
Subject: --> There is an error in XML document (1, 413). --> 'Element' is an invalid node type. Line 1, position 413.</faultstring
david.inglis@...
Send Email Send Email
 
can any body shed any lite on this error message I am recieving.  I  am told that what I'am sending looks ok but this is the message I get back from the server.
 
 
Thanks in advance
 
David Inglis

#4668 From: Stephen Strudwick <mail@...>
Date: Thu May 12, 2005 1:52 pm
Subject: Nested header elements problem
interneteye
Send Email Send Email
 
Hi,

I've run into a problem I cant solve, i'm trying to insert something like this:

  
<AuthenticationInfo><userName>User</userName><password>Password</password></Auth\
enticationInfo>

into the clients header response for authentication.

I can insert it without nesting like this:

print $service->OpGetListADSL(
SOAP:: Header->name('username' => 'user'),
SOAP:: Header->name('password' => 'pass')
);

And that kind of works, producing:

   <SOAP-ENV:Header>
    <password xsi:type="xsd:string">steve</password>
   </SOAP-ENV:Header>

but puts the username in the body.. ?

Then when I try and nest it in the same way as the SOAP::Data example:

print $service->OpGetListADSL(

SOAP::Header
-> name(AuthenticationInfo =>
    \SOAP::Header->value(
SOAP:: Header->name('username' => 'steve'),
SOAP:: Header->name('password' => 'steve')))

);

it sticks it all in the body not the header:

<SOAP-ENV:Body>
   <OpGetListADSL xmlns="">
   <AuthenticationInfo>
   <username xsi:type="xsd:string">steve</username>
   <password xsi:type="xsd:string">steve</password>
    </AuthenticationInfo>
    </OpGetListADSL>
</SOAP-ENV:Body>

I suspect I am misunderstanding how to do this, any pointers in the right
direction would be appreciated as I am getting very confused.

-
stephen strudwick

#4669 From: Byrne Reese <byrne@...>
Date: Thu May 12, 2005 5:16 pm
Subject: Re: Nested header elements problem
byrnereese
Send Email Send Email
 
What version of SOAP::Lite are you using? At first glance this looks
like a problem with SOAP::Lite - odd that noone has reported it  yet.

Stephen Strudwick wrote:

> Hi,
>
> I've run into a problem I cant solve, i'm trying to insert something
> like this:
>
>
>
<AuthenticationInfo><userName>User</userName><password>Password</password></Auth\
enticationInfo>
>
> into the clients header response for authentication.
>
> I can insert it without nesting like this:
>
> print $service->OpGetListADSL(
> SOAP:: Header->name('username' => 'user'),
> SOAP:: Header->name('password' => 'pass')
> );
>
> And that kind of works, producing:
>
>   <SOAP-ENV:Header>
>    <password xsi:type="xsd:string">steve</password>
>   </SOAP-ENV:Header>
>
> but puts the username in the body.. ?
>
> Then when I try and nest it in the same way as the SOAP::Data example:
>
> print $service->OpGetListADSL(
>
> SOAP::Header
> -> name(AuthenticationInfo =>
>    \SOAP::Header->value(
> SOAP:: Header->name('username' => 'steve'),
> SOAP:: Header->name('password' => 'steve')))
>
> );
>
> it sticks it all in the body not the header:
>
> <SOAP-ENV:Body>
>   <OpGetListADSL xmlns="">
>   <AuthenticationInfo>
>   <username xsi:type="xsd:string">steve</username>
>   <password xsi:type="xsd:string">steve</password>
>    </AuthenticationInfo>
>    </OpGetListADSL>
> </SOAP-ENV:Body>
>
> I suspect I am misunderstanding how to do this, any pointers in the right
> direction would be appreciated as I am getting very confused.
>
> -
> stephen strudwick
>
>
> ------------------------------------------------------------------------
> *Yahoo! Groups Links*
>
>     * To visit your group on the web, go to:
>       http://groups.yahoo.com/group/soaplite/
>
>     * To unsubscribe from this group, send an email to:
>       soaplite-unsubscribe@yahoogroups.com
>       <mailto:soaplite-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>
>     * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>.
>
>

#4670 From: Byrne Reese <byrne@...>
Date: Thu May 12, 2005 5:33 pm
Subject: Re: namespace/nesting problem: The Answer
byrnereese
Send Email Send Email
 
Ok, I was mistaken - there is not an article on majordojo on how to
modify the root element of the SOAP Body.
http://www.majordojo.com/archives/000009.php

Here is the man page for register_ns:
http://www.majordojo.com/soaplite/docs/Serializer.html

Example:
$ser->register_ns("urn:foo","myns");

A question I have is why is overriding the Body necessary?

Chris Nielsen wrote:

>
> Hi Byrne,
>
> If you have a link to the howto, I'll be happy to check it out, but I
> couldn't find it on majordojo.com. I searched for "howto", There was one
> for nesting but the body tag is simple, not what I'm looking for. BTW,
> there is a link to an article "SOAP::Lite Client HOWTO" (soapenv.org) but
> that brings up a "this page parked free, courtesy of godaddy.com".
> Googling for "SOAP::Lite Client HOWTO" didn't get anything. Searching
> majordojo for "register_ns" responded 'no pages found'...
>
> Anyway, I'll be glad to check anything you think relevant, and if
> something I'm doing is screwy please let me know.
>
> Thanks,
> -C
>
>
>
> On Mon, 9 May 2005, Byrne Reese wrote:
>
> > Check out http://www.majordojo.com/soaplite/ which contains a HOWTO on
> > overriding the SOAP Body of a request message.
> >
> > Chris Nielsen wrote:
> >
> > >
> > > Thanks Byrne for the response.
> > >
> > > I'm not sure if I'm understanding correctly, but it's the <Body>
> > > tag that needs to change, not the envelope. And from the only docs
> I found
> > > (the single paragraph on the cpan page) it looks like it's the
> envelope
> > > that is modified by register_ns, not the body tag. Apologies if I'm
> > > missing something fundamental. It could be I'm not doing this
> correctly
> > > but what I did was add something like:
> > >
> > >     $soap->serializer->register_ns('xmlns:NS2','urn:SInfotype');
> > >
> > > I don't see the the body tag change as a result. What I do see is a
> > > change
> > > change in the soap:Envelope tag,
> > >
> > > If anyone can post or refer to an example where the body tag looks
> like
> > > the example below (with the NS def), and the NS1 and NS2 sections are
> > > parallel inside the body, or have other ideas, I'll be happy to try
> > > that.
> > > I just haven't seen any way to meet the requirement without
> writing the
> > > xml manually.
> > >
> > > Thanks,
> > > C
>
>
>
> --
> Christopher Nielsen    chris@...    http://ZORINco.com
> ______________________________________________________________
>        Electronic Products  -  Consulting  -  Hosting
>
>      C  O  N  T  R  O  L    Y  O  U  R    W  O  R  L  D
>
>
>
> ------------------------------------------------------------------------
> *Yahoo! Groups Links*
>
>     * To visit your group on the web, go to:
>       http://groups.yahoo.com/group/soaplite/
>
>     * To unsubscribe from this group, send an email to:
>       soaplite-unsubscribe@yahoogroups.com
>       <mailto:soaplite-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>
>     * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>.
>
>

#4671 From: Alex Pena <alex@...>
Date: Thu May 12, 2005 6:01 pm
Subject: Re: Nested header elements problem
bigel0w21
Send Email Send Email
 
I use the following which adds it into the header :
-------------------------------------------
#!/usr/bin/perl -w
use SOAP::Lite
#trace=>'all',
;

$proxy = 'http://web_service_here.com/WSDL';
$uri = 'HPD_Helpdesk_WSDL';

$header = SOAP::Header->name(
                          'AuthenticationInfo' =>
                  \SOAP::Header->value(
          SOAP::Header->name('userName' => "youruser")->type(''),
          SOAP::Header->name('password' => "yourpass")->type(''),
                          )
                          );

$data = (SOAP::Data->name('Ticket' => "12345"));

$soap = new SOAP::Lite(proxy=>$proxy,uri=>$uri,readable=>'true',);
$result = $soap->OpGet($header,$data);

if ($result->fault){
          print "-----------------------------------------\n";
          print "Fault :", $result->faultstring, "\n";
          print "Faultcode :",$result->faultcode, "\n";
          print "Faultdetail :", %{$result->faultdetail}, "\n";
   } else {
          foreach my $field ($result->valueof("//OpGetResponse")) {
                  print "\n";
                  foreach my $field_name (sort keys %{$field}) {
                          print $field_name, ": '",
$field->{$field_name}, "'\n";
                  }
                  print "\n";
          }
}

----------------------------------------------------


Soap call created:

<SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/1999/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/1999/XMLSchema"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
    <SOAP-ENV:Header>
      <AuthenticationInfo>
        <userName>testusera</userName>
        <password>testusera</password>
    </AuthenticationInfo>
</SOAP-ENV:Header>
    <SOAP-ENV:Body>
      <namesp1:OpGet xmlns:namesp1="HPD_Helpdesk_WSDL">
        <Ticket xsi:type="xsd:string">12345</Assigned_To_Group>
</namesp1:OpGet></SOAP-ENV:Body></SOAP-ENV:Envelope>



Alex,


On May 12, 2005, at 10:16 AM, Byrne Reese wrote:

> What version of SOAP::Lite are you using? At first glance this looks
>  like a problem with SOAP::Lite - odd that noone has reported it  yet.
>
>  Stephen Strudwick wrote:
>
>  > Hi,
>  >
>  > I've run into a problem I cant solve, i'm trying to insert something
>  > like this:
>  >
>  >  
>  >
> <AuthenticationInfo><userName>User</userName><password>Password</
> password></AuthenticationInfo>
>  >
>  > into the clients header response for authentication.
>  >
>  > I can insert it without nesting like this:
>  >
>  > print $service->OpGetListADSL(
>  > SOAP:: Header->name('username' => 'user'),
>  > SOAP:: Header->name('password' => 'pass')
>  > );
>  >
>  > And that kind of works, producing:
>  >
>  >   <SOAP-ENV:Header>
>  >    <password xsi:type="xsd:string">steve</password>
>  >   </SOAP-ENV:Header>
>  >
>  > but puts the username in the body.. ?
>  >
>  > Then when I try and nest it in the same way as the SOAP::Data
> example:
>  >
>  > print $service->OpGetListADSL(
>  >
>  > SOAP::Header
>  > -> name(AuthenticationInfo =>
>  >    \SOAP::Header->value(
>  > SOAP:: Header->name('username' => 'steve'),
>  > SOAP:: Header->name('password' => 'steve')))
>  >
>  > );
>  >
>  > it sticks it all in the body not the header:
>  >
>  > <SOAP-ENV:Body>
>  >   <OpGetListADSL xmlns="">
>  >   <AuthenticationInfo>
>  >   <username xsi:type="xsd:string">steve</username>
>  >   <password xsi:type="xsd:string">steve</password>
>  >    </AuthenticationInfo>
>  >    </OpGetListADSL>
>  > </SOAP-ENV:Body>
>  >
>  > I suspect I am misunderstanding how to do this, any pointers in the
> right
>  > direction would be appreciated as I am getting very confused.
>  >
>  > -
>  > stephen strudwick
>  >
>  >
>  >
> -----------------------------------------------------------------------
> -
>  > *Yahoo! Groups Links*
>  >
>  >     * To visit your group on the web, go to:
>  >       http://groups.yahoo.com/group/soaplite/
>  >       
>  >     * To unsubscribe from this group, send an email to:
>  >       soaplite-unsubscribe@yahoogroups.com
>  >      
> <mailto:soaplite-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>  >       
>  >     * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>  >       Service <http://docs.yahoo.com/info/terms/>.
>  >
>  >
>
>
>
> Yahoo! Groups Links
>  •  To visit your group on the web, go to:
> http://groups.yahoo.com/group/soaplite/
>  
>  •  To unsubscribe from this group, send an email to:
> soaplite-unsubscribe@yahoogroups.com
>  
>  •  Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> Service.
>
>

#4672 From: thom@...
Date: Fri May 13, 2005 7:54 pm
Subject: Async
teden
Send Email Send Email
 
Folks,

Two years ago I built a web service using Perl & SOAP::Lite. The project has
been highly successful at my client location. Because of architecture
constraints, it was built using SOAP::Transport::HTTP. Calls are synchronous,
and we use fork'ing to achieve a higher active session count.

Now comes the fun. I've been asked to convert the service to an asynchronous
service. Thus, calls for service will be immediately replied to with a callback
number (like a request id) while the procedure operates on the input data. After
the client waits a certain amount of time, they will initiate a getresults()
method with the callback number as a parameter, and they can get their results
(if ready).

It is not intuitively obvious to me how to make the server respond and keep
working on the service request. Any ideas?

Thom Eden
______________________________________
This E-Mail was sent with Fronthost Web/Mail.
Use www.fronthost.com for all your hosting and development needs.

#4673 From: "casadcc99" <ccasad@...>
Date: Fri May 13, 2005 8:56 pm
Subject: Newbie Question
casadcc99
Send Email Send Email
 
We have a soap client someone wrote in .NET and I am trying to mimic
this client using Perl SOAP::Lite.

The documentation for the webservice server says that the request
should look like the following:

POST /TMCGatewayWebservice/TMCGateway.asmx HTTP/1.1
Host: x.x.x.x
Content-Type: text/xml; charset=utf-8
Content-Length: length
SOAPAction: "http://y.y.y.y/TMCGateway/Authenticate"

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Header>
     <AccountCredentials xmlns="http://y.y.y.y/TMCGateway/">
       <AccountID>string</AccountID>
       <Password>string</Password>
     </AccountCredentials>
   </soap:Header>
   <soap:Body>
     <Authenticate xmlns="http://y.y.y.y/TMCGateway/" />
   </soap:Body>
</soap:Envelope>

When I build my request via SOAP::Lite I get this:

SOAP::Transport::HTTP::Client::send_receive:
POST http://y.y.y.y/TMCGatewayWebservice/TMCGateway.asmx
Accept: text/xml
Accept: multipart/*
Content-Length: 613
Content-Type: text/xml; charset=utf-8
SOAPAction: http://y.y.y.y/TMCGatewayWebservice/Authenticate

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:xsi="http://www.w3.org/1999/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/1999/XMLSchema"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
   <SOAP-ENV:Header>
     <AccountCredentials>
       <AccountID>myid</AccountID>
       <Password>mypassword</Password>
     </AccountCredentials>
   </SOAP-ENV:Header>
   <SOAP-ENV:Body>
     <namesp1:Authenticate
xmlns:namesp1="http://y.y.y.y/TMCGatewayWebservice"/>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The response from the server is :

SOAP::Transport::HTTP::Client::send_receive: HTTP/1.1 500 (Internal
Server Error
) Internal Server Error.
Cache-Control: private
Date: Fri, 13 May 2005 20:10:35 GMT
Server: Microsoft-IIS/6.0
Content-Length: 511
Content-Type: text/xml; charset=utf-8
Client-Date: Fri, 13 May 2005 20:10:27 GMT
Client-Peer: z.z.z.z
Client-Response-Num: 1
MicrosoftOfficeWebServer: 5.0_Pub
X-AspNet-Version: 1.1.4322
X-Powered-By: ASP.NET

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <soap:Body>
     <soap:Fault>
       <faultcode>soap:Client</faultcode>
       <faultstring>Server did not recognize the value of HTTP Header
SOAPAction:
  http://y.y.y.y/TMCGatewayWebservice/Authenticate.</faultstring>
       <detail />
     </soap:Fault>
   </soap:Body>
</soap:Envelope>
response = 1
Fault: Server did not recognize the value of HTTP Header SOAPAction:
http://y.y.y.y/TMCGatewayWebservice/Authenticate.


Here is my code:

#!/usr/local/bin/perl -w

use SOAP::Lite +trace => 'debug', on_action => sub {sprintf '%s/%s', @_};

use strict;

my $username = "myid";
my $password = "mypassword";
my $proxy = "http://y.y.y.y/TMCGatewayWebservice/TMCGateway.asmx";
my $uri = "http://y.y.y.y/TMCGatewayWebservice";

#The name of the module
my $soap = SOAP::Lite->uri($uri);

#The url for the request
$soap = $soap->proxy($proxy);

my $header = SOAP::Header->name(
				 'AccountCredentials' =>
						 \SOAP::Header->value(
									 SOAP::Header->name('AccountID' => $username)->type(''),
									 SOAP::Header->name('Password' => $password)->type(''),));

# send the request w/ header
my $response = $soap->Authenticate($header);

print "response = $response\n";

# get the result and print the error message if it failed
if (defined (my $result = $response->result)) {
	 print "result = $result\n";
} else {
	 print "Fault: ", $response->faultstring, "\n", "Detail:\n",
$response->faultdetail, "\n";
}


It is getting the error: "Server did not recognize the value of HTTP
Header SOAPAction"

Anyone have any idea what I am missing here?

Thanks,
Chris

#4674 From: "jigsaw9876" <jigsaw9876@...>
Date: Fri May 13, 2005 10:28 pm
Subject: Document/Literal service
jigsaw9876
Send Email Send Email
 
Hi,

    I have a few rpc/encoded SOAP::Lite services at present. I would like to use
document/
literal service now. While I see lots of samples on how to develop one using
other
languages and implementations, I am bit lost w.r.t SOAP::lite.

I have come up with a WSDL for my service, the request is defined by a schema
and the
response is an xml defined by yet another schema.  For example, using Java I
would
receive the xml, have a set of classes/bindings generated based on the xsd and
use these
to extract data out of xml, process and return an xml. Now, what would my server
side
code look like with Perl and SOAP::Lite?  I presume SOAP::Server::Parameters
would help
only when I have a specific method defined. How would I extract elements from
the xml?
For example, if the following is my SOAPRequest, what would my server code be
like?
Would really appreciate any help.
Thanks in advance,
JS.

<?xml version="1.0" encoding="UTF-8"?>
<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:
xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/
XMLSchema-instance" xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:
ns0="http://www.examples.com/types">
<env:Body>
<ns0:PurchaseOrderDocument><billTo><street>1 Main Street</street><city>Beverly
Hills</city><state>CA</state><zipCode>90210</zipCode></
billTo><createDate>2004-08-30T10:36:44.330-04:00</
createDate><items><itemname>Copier Paper</itemname><price>10</
price><quantity>2</quantity></items><items><itemname>Toner</
itemname><price>920</price><quantity>1</quantity></items><poID>ABC-CO
-19282</poID><shipTo><street>1 Main Street</street><city>Beverly Hills</
city><state>CA</state><zipCode>90210</zipCode></shipTo></ns0:
PurchaseOrderDocument></env:Body></env:Envelope>

#4675 From: "Erik" <erikba@...>
Date: Sat May 14, 2005 1:04 am
Subject: Another of your favorite "Denied Access" errors
odysseus654
Send Email Send Email
 
Spent a good portion of the day trying to get a client and server
talking to each other.  Server is whatever version of SOAP::Lite is
currently available over CPAN.  Client is gSoap 2.7 with a WinInet
thunk (C++).

I have compiled a client and ran it successfully, with the response
"hello world".  This program runs properly about five times.  On the
sixth time, it returns the following error:

SOAP FAULT: SOAP-ENV:Client
"Denied access to method (hi) in class (Demo) at
/usr/local/share/perl/5.8.4/SOAP/Lite.pm line 2403."

If I keep running it over and over again I get the "hello world" about
a quarter of the time, otherwise I get this error message.

This seems to be more of an environmental issue than a namespace
issue, any ideas on how I can make this run a bit more stable?

Retyping as many aspects of my configuration as I can think of...

Apache2-mpm-prefork 2.0.53-5
libapache2-mod-perl2 1.999.21-1

---

Alias /soap /usr/local/lib/soap/index.cgi
<Location /soap>
   SetHandler perl-script
   PerlHandler ModPerl::Registry
   PerlSendHeader On
   Options +ExecCGI
</Location>
<Location /soap/modules>
   Deny from all
</Location>

---

#!perl -w

use SOAP::Transport::HTTP;

SOAP::Transport::HTTP::CGI
  -> dispatch_to('/usr/local/lib/soap/modules')
  -> handle
;

---

package Demo;

sub hi {
   return "hello, world";
}

sub by {
   return "goodbye, cruel world";
}

1;

#4676 From: "jigsaw9876" <jigsaw9876@...>
Date: Mon May 16, 2005 9:35 am
Subject: Re: Async
jigsaw9876
Send Email Send Email
 
Hi,

I have a similar service - where user submits a job, gets a job identifier in
return and then
polls for the status/result of the job using the id. Now, we have a queuing
system at the
backend and a good bit of storage, so while the server submits the job to the
queue and
forwards the jobid it receives, the job continues to run and the result/error
are stored for
when the user polls for it. I am not quite sure on how one would do this without
a system
setup to specifically handle this.

sorry not of much help.
JS.

--- In soaplite@yahoogroups.com, thom@d... wrote:
> Folks,
>
> Two years ago I built a web service using Perl & SOAP::Lite. The project has
> been highly successful at my client location. Because of architecture
> constraints, it was built using SOAP::Transport::HTTP. Calls are synchronous,
> and we use fork'ing to achieve a higher active session count.
>
> Now comes the fun. I've been asked to convert the service to an asynchronous
> service. Thus, calls for service will be immediately replied to with a
callback
> number (like a request id) while the procedure operates on the input data.
After
> the client waits a certain amount of time, they will initiate a getresults()
> method with the callback number as a parameter, and they can get their results
> (if ready).
>
> It is not intuitively obvious to me how to make the server respond and keep
> working on the service request. Any ideas?
>
> Thom Eden
> ______________________________________
> This E-Mail was sent with Fronthost Web/Mail.
> Use www.fronthost.com for all your hosting and development needs.

#4677 From: "snoogen314" <snoogen314@...>
Date: Mon May 16, 2005 11:50 am
Subject: Complex data structure for .NET client
snoogen314
Send Email Send Email
 
Hi,

I want to pass an array of hashes from a soaplite server to a .net
client, using document/literal.

I've read http://www.majordojo.com/archives/000230.php about how to
generate complex data structures, but it looks like it's in
RPC/encoded mode (with types embedded in the SOAP message)

Is there a way to produce a doc/literal message with a custom
serializer that would generate something like this:

<Array>
<ArrayItem><name>foo</name><address>123</address></ArrayItem>
<ArrayItem><name>bar</name><address>456</address></ArrayItem>
</Array>

Which corresponds to this perl structure:
[
   { name => 'foo', address => 123 },
   { name => 'bar', address => 456 },
]

#4678 From: Byrne Reese <byrne@...>
Date: Mon May 16, 2005 2:39 pm
Subject: Re: Re: Async
byrnereese
Send Email Send Email
 
This is not nearly as difficult as it may seem. If you are doing this
commercially, Grand Central Communications has a product that does just
this. It provides an asynchronous message bus to any synchronous
service. However, I am not sure the pricing recently, but they have an
excellent model for this.

Also - app servers like BEA and .NET do this as well, and it is all
built in.

But of course - this is a PERL mailing list, so let me tell you how I
would do it:.

Server side correlation:
Just as you realize, the first call is the request. The server will/
generate a unique identifier for the job and stick it in the database.
The server will return to the user the unique job id to the user. The
user/client then starts polling the same server for the response using
the job id as a parameter to the request. When the request is ready, it
is returned in the response to the poll request.
If you are looking for a model for how to do this and need something to
code against, Grand Central's Message Protocol document is an excellent
resource and can tell you at a low level, all the things you would need
to consider.

Client side correlation:
Assuming the client has the ability to accept a message via CGI or some
such mechanism...
Let the client generate a unique job id. Then pass to the server in a
SOAP header, the job id, and the URL to which the response should be
posted when then job is done. The server then receives the request,
queues it up, processes it, and when the result is ready posts the
response to the URL provided by the client with the client id encoded
within it.

Those are the two major modes of asynchronous messaging. You should
consider which approach is best for you, then post back to the group and
perhaps someone can help put the pieces together for you. :)

Byrne

jigsaw9876 wrote:

> Hi,
>
> I have a similar service - where user submits a job, gets a job
> identifier in return and then
> polls for the status/result of the job using the id. Now, we have a
> queuing system at the
> backend and a good bit of storage, so while the server submits the job
> to the queue and
> forwards the jobid it receives, the job continues to run and the
> result/error are stored for
> when the user polls for it. I am not quite sure on how one would do
> this without a system
> setup to specifically handle this.
>
> sorry not of much help.
> JS.
>
> --- In soaplite@yahoogroups.com, thom@d... wrote:
> > Folks,
> >
> > Two years ago I built a web service using Perl & SOAP::Lite. The
> project has
> > been highly successful at my client location. Because of architecture
> > constraints, it was built using SOAP::Transport::HTTP. Calls are
> synchronous,
> > and we use fork'ing to achieve a higher active session count.
> >
> > Now comes the fun. I've been asked to convert the service to an
> asynchronous
> > service. Thus, calls for service will be immediately replied to with
> a callback
> > number (like a request id) while the procedure operates on the input
> data. After
> > the client waits a certain amount of time, they will initiate a
> getresults()
> > method with the callback number as a parameter, and they can get
> their results
> > (if ready).
> >
> > It is not intuitively obvious to me how to make the server respond
> and keep
> > working on the service request. Any ideas?
> >
> > Thom Eden
> > ______________________________________
> > This E-Mail was sent with Fronthost Web/Mail.
> > Use www.fronthost.com for all your hosting and development needs.
>
>
>
> ------------------------------------------------------------------------
> *Yahoo! Groups Links*
>
>     * To visit your group on the web, go to:
>       http://groups.yahoo.com/group/soaplite/
>
>     * To unsubscribe from this group, send an email to:
>       soaplite-unsubscribe@yahoogroups.com
>       <mailto:soaplite-unsubscribe@yahoogroups.com?subject=Unsubscribe>
>
>     * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
>       Service <http://docs.yahoo.com/info/terms/>.
>
>

#4679 From: Chris Nielsen <chris@...>
Date: Tue May 17, 2005 11:52 pm
Subject: Re: namespace/nesting problem: The Answer
zchris98119
Send Email Send Email
 
Hi Byrne,

I've seen that article.
My assumption is that we need to match the way the WSDL file specifies two
separate complexTypes with <xs:sequence> defining what ends up being
inside the paralell NS1 and NS2 blocks. And NS2 is not nested. Rather than
guess as to how the interpreter at the other end will deal with the
closest I can get Soap::Lite to do it, it seems Soap::Lite should be
capable of matching the structure we see at the other end - requests are
more or less rebuilt and echoed back. In that, it is the more complex Body
tak, where there is NS information inside and not just <SOAP-ENV:Body> as
all the Soap::Lite examples and posts I've seen look.

Cheers,
C

On Thu, 12 May 2005, Byrne Reese wrote:

> Ok, I was mistaken - there is not an article on majordojo on how to
> modify the root element of the SOAP Body.
> http://www.majordojo.com/archives/000009.php
>
> Here is the man page for register_ns:
> http://www.majordojo.com/soaplite/docs/Serializer.html
>
> Example:
> $ser->register_ns("urn:foo","myns");
>
> A question I have is why is overriding the Body necessary?
>
> Chris Nielsen wrote:
>
> >
> > Hi Byrne,
> >
> > If you have a link to the howto, I'll be happy to check it out, but I
> > couldn't find it on majordojo.com. I searched for "howto", There was one
> > for nesting but the body tag is simple, not what I'm looking for. BTW,
> > there is a link to an article "SOAP::Lite Client HOWTO" (soapenv.org) but
> > that brings up a "this page parked free, courtesy of godaddy.com".
> > Googling for "SOAP::Lite Client HOWTO" didn't get anything. Searching
> > majordojo for "register_ns" responded 'no pages found'...
> >
> > Anyway, I'll be glad to check anything you think relevant, and if
> > something I'm doing is screwy please let me know.
> >
> > Thanks,
> > -C
> >
> >
> >
> > On Mon, 9 May 2005, Byrne Reese wrote:
> >
> > > Check out http://www.majordojo.com/soaplite/ which contains a HOWTO on
> > > overriding the SOAP Body of a request message.
> > >
> > > Chris Nielsen wrote:
> > >
> > > >
> > > > Thanks Byrne for the response.
> > > >
> > > > I'm not sure if I'm understanding correctly, but it's the <Body>
> > > > tag that needs to change, not the envelope. And from the only docs
> > I found
> > > > (the single paragraph on the cpan page) it looks like it's the
> > envelope
> > > > that is modified by register_ns, not the body tag. Apologies if I'm
> > > > missing something fundamental. It could be I'm not doing this
> > correctly
> > > > but what I did was add something like:
> > > >
> > > >     $soap->serializer->register_ns('xmlns:NS2','urn:SInfotype');
> > > >
> > > > I don't see the the body tag change as a result. What I do see is a
> > > > change
> > > > change in the soap:Envelope tag,
> > > >
> > > > If anyone can post or refer to an example where the body tag looks
> > like
> > > > the example below (with the NS def), and the NS1 and NS2 sections are
> > > > parallel inside the body, or have other ideas, I'll be happy to try
> > > > that.
> > > > I just haven't seen any way to meet the requirement without
> > writing the
> > > > xml manually.
> > > >
> > > > Thanks,
> > > > C
> >
> >
> >
> > --
> > Christopher Nielsen    chris@...    http://ZORINco.com
> > ______________________________________________________________
> >        Electronic Products  -  Consulting  -  Hosting
> >
> >      C  O  N  T  R  O  L    Y  O  U  R    W  O  R  L  D
> >
> >
> >
> > ------------------------------------------------------------------------
> > *Yahoo! Groups Links*
> >
> >     * To visit your group on the web, go to:
> >       http://groups.yahoo.com/group/soaplite/
> >
> >     * To unsubscribe from this group, send an email to:
> >       soaplite-unsubscribe@yahoogroups.com
> >       <mailto:soaplite-unsubscribe@yahoogroups.com?subject=Unsubscribe>
> >
> >     * Your use of Yahoo! Groups is subject to the Yahoo! Terms of
> >       Service <http://docs.yahoo.com/info/terms/>.
> >
> >
>
>
>
>
>
> Yahoo! Groups Links
>
>
>
>
>
>

--
Christopher Nielsen    chris@...    http://ZORINco.com
______________________________________________________________
        Electronic Products  -  Consulting  -  Hosting

      C  O  N  T  R  O  L    Y  O  U  R    W  O  R  L  D

Messages 4650 - 4679 of 6629   Oldest  |  < Older  |  Newer >  |  Newest
Add to My Yahoo!      XML What's This?

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help