Re: Re: Newbie question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hah!  No, I'm afraid that it is not nearly as easy to use as Axis.

However, I have slain the beast, and am more than willing to help you, too,
if you want to use it.  If you intend to deploy only on Oracle platforms,
that's a good choice.  Otherwise, stick with Axis, since Apache+Axis is a
more common platform than Oracle's App Server.

Generating a WSDL from your Java code is just as automatic as having Axis do
it, it simply gives you more control over the final product.  I have never
been happy with any automatically-generated WSDL.  My current
WSDL-generation workflow is: I use Oracle's JDeveloper Java IDE to generate
a WSDL based on my code, run a macro on it in my text editor to massage it,
then include that massaged WSDL in my deployment package.

We should probably take this conversation offline, as it now has nothing
whatsoever to do with PHP.

-Peter

btw, I DO recommend Oracle's JDeveloper as an IDE.  I've tried a half-dozen
Java IDEs and JDeveloper is the best I've found.  It's a resource hog,
though: 1GB of RAM is almost essential.

""Patrick Hanna"" <phanna@email.unc.edu> wrote in message
200602021708.k12H893s010789@smtp.unc.edu">news:200602021708.k12H893s010789@smtp.unc.edu...
> How is Oracle's Application Server? Is it as easy as using Axis? I'll try
to
> generate the WSDL from Java but I like having the automatic generation
> provided by axis (plus WSDLs can be difficult to write).
>
> Thanks,
>
> Patrick
>
> -----Original Message-----
> From: Peter Guy [mailto:pguy@vrcis.com]
> Sent: Thursday, February 02, 2006 12:02 PM
> To: soap@lists.php.net
> Subject: Re:  Re: Newbie question
>
> Yeah, I had to do a lot of googling in order to configure my WSDD.
>
> As for generating my WSDL, I ended up compiling my Java with the debug
> option turned on, then running the command I specified in my last posting.
> It seemed to generate an OK WSDL.
>
> I ended up switching platforms from Axis to Oracle's Application Server,
> else I'd have more pointers for you.
>
> -Peter
>
> ""Patrick Hanna"" <phanna@email.unc.edu> wrote in message
> 200602010400.k11400UI006600@smtp.unc.edu">news:200602010400.k11400UI006600@smtp.unc.edu...
> > I use axis to deploy my service using their WSDD deployment files. Since
> the
> > documentation for WSDD is severely limited on the Axis site, I can't
> figure
> > out everything I need to do to get the wsdl set up correctly.
> >
> > Patrick
> >
> > -----Original Message-----
> > From: Peter Guy [mailto:pguy@vrcis.com]
> > Sent: Tuesday, January 31, 2006 6:41 PM
> > To: soap@lists.php.net
> > Subject: Re:  Re: Newbie question
> >
> > wellll..., if it ain't broke, don't fix it.
> >
> > I just saw several namespace prefixes being used that weren't defined:
> wsdl,
> > xsd, impl, etc...
> >
> > I was unable to consume your WSDL using Oracle's JDeveloper, which has a
> > "build a client stub from a WSDL" feature.  I have not tried to consume
it
> > using PHP.
> >
> > If you're able to consume it, then, well, great!
> >
> > How did you generate it?  I ended up manually generating my wsdl in
Axis,
> > using the following command:
> >
> > java org.apache.axis.wsdl.Java2WSDL -o <output file> -l <endpoint
URL> -n
> > <targetNamespace> -y RPC -u ENCODED -T 1.1 <java web service class>
> >
> > hth,
> >
> > -Peter
> >
> > btw, I found Axis' port monitor to be invaluable.
> >
> > ""Patrick Hanna"" <phanna@email.unc.edu> wrote in message
> > 200601312328.k0VNSDDW016886@smtp.unc.edu">news:200601312328.k0VNSDDW016886@smtp.unc.edu...
> > > I figured out that I had set up the original beanMapping incorrectly
and
> I
> > > fixed it and now it works. But now that you meantion my namespaces
> > problem,
> > > how should I fix it? Do I need to set up schemas for my custom types?
> > >
> > > Thanks,
> > >
> > > Patrick
> > >
> > > -----Original Message-----
> > > From: Peter Guy [mailto:pguy@vrcis.com]
> > > Sent: Tuesday, January 31, 2006 5:55 PM
> > > To: soap@lists.php.net
> > > Subject:  Re: Newbie question
> > >
> > > The structure of your WSDL looks alright, although the namespaces are
> not
> > > setup correctly.
> > > That may be because you cut them out for brevity in your post...
> > >
> > > I think your problem is with Axis, not PHP.
> > >
> > > What's happening is that Axis doesn't know how to turn the "Number"
> > complex
> > > type into a Java object (it's called "deserialization", and it's the
> bane
> > of
> > > the Web Service author).
> > >
> > > You need to help Axis out a little by including a beanMapping element
in
> > > your wsdd file.  Something along these lines may work:
> > > <service>
> > > ...
> > > <beanMapping qname="ns:Number"
> > > languageSpecificType="java:samples.stock.StockQuoteService.Number"/>
> > > ...
> > > </service>
> > >
> > > Although you may need to use a typeMapping element, depending on your
> Java
> > > object.
> > >
> > > Check out http://www.osmoticweb.com/axis-wsdd/ for more wsdd goodness.
> > >
> > > hth,
> > >
> > > -Peter
> > >
> > > "Patrick Hanna" <phanna@email.unc.edu> wrote in message
> > > C0052195.22EF%phanna@email.unc.edu">news:C0052195.22EF%phanna@email.unc.edu...
> > > > I cannot for the life of me get this to work. I have a service with
> this
> > > > wsdl:
> > > >
> > > > <wsdl:definitions
> > > > targetNamespace="http://192.168.0.2:8080/axis/services/quotes";>
> > > >     <!--
> > > >     WSDL created by Apache Axis version: 1.3
> > > >     Built on Oct 05, 2005 (05:23:37 EDT)
> > > >     -->
> > > >     <wsdl:types>
> > > >         <schema targetNamespace="http://stock.samples/";>
> > > >             <import
> > > namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
> > > >             <complexType name="Number">
> > > >                 <sequence>
> > > >                     <element name="data" type="xsd:float"/>
> > > >                 </sequence>
> > > >             </complexType>
> > > >         </schema>
> > > >     </wsdl:types>
> > > >     <wsdl:message name="testResponse">
> > > >         <wsdl:part name="testReturn" type="tns1:Number"/>
> > > >     </wsdl:message>
> > > >     <wsdl:message name="testRequest">
> > > >         <wsdl:part name="in0" type="tns1:Number"/>
> > > >     </wsdl:message>
> > > >     <wsdl:portType name="StockQuoteService">
> > > >         <wsdl:operation name="test" parameterOrder="in0">
> > > >             <wsdl:input message="impl:testRequest"
> name="testRequest"/>
> > > >             <wsdl:output message="impl:testResponse"
> > name="testResponse"/>
> > > >         </wsdl:operation>
> > > >     </wsdl:portType>
> > > >     <wsdl:binding name="quotesSoapBinding"
> > type="impl:StockQuoteService">
> > > >         <wsdlsoap:binding style="rpc"
> > > > transport="http://schemas.xmlsoap.org/soap/http"/>
> > > >         <wsdl:operation name="test">
> > > >             <wsdlsoap:operation soapAction=""/>
> > > >             <wsdl:input name="testRequest">
> > > >                 <wsdlsoap:body
> > > > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
> > > > namespace="http://stock.samples"; use="encoded"/>
> > > >             </wsdl:input>
> > > >             <wsdl:output name="testResponse">
> > > >                 <wsdlsoap:body
> > > > encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";
> > > > namespace="http://192.168.0.2:8080/axis/services/quotes";
> use="encoded"/>
> > > >             </wsdl:output>
> > > >         </wsdl:operation>
> > > >     </wsdl:binding>
> > > >     <wsdl:service name="StockQuoteServiceService">
> > > >         <wsdl:port binding="impl:quotesSoapBinding" name="quotes">
> > > >             <wsdlsoap:address
> > > > location="http://192.168.0.2:8080/axis/services/quotes"/>
> > > >         </wsdl:port>
> > > >     </wsdl:service>
> > > > </wsdl:definitions>
> > > >
> > > > Basically I have a service with a test() method that takes a
> complexType
> > > > Number and returns another complexType Number. I've been able to
> return
> > > > things from the test method and bind them to a Number object or just
> use
> > > > ->{"data"} to access the result. I cannot pass objects correctly
> though.
> > > >
> > > > All my attempts at passing objects result in
> "org.xml.sax.SAXException:
> > No
> > > > object was found for class type class
> samples.stock.StockQuoteService."
> > > I'm
> > > > not sure what I'm doing wrong or if my wsdl is incorrect. What is
the
> > > proper
> > > > way to pass a complex type to an object? I've tried using wsdl2php
but
> I
> > > > received the same error so I assume my wsdl must be incorrect.
> > > >
> > > > Can someone please help? Any pointers will be appreciated.
> > > >
> > > > Pat

-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux