You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Dennis Sosnoski <dm...@sosnoski.com> on 2002/11/01 19:23:26 UTC

Web service from Java code - online example

New users might be interested in an example I posted of using Axis to 
build a web service from existing Java code: 
http://www.sosnoski.com/presents/java-xml/axis/axis-service.html This 
uses the approach of Java->WSDL->Java, keeping the original code for the 
server side and using the generated code for a test client.

I helped a client go through this process a couple of weeks ago and 
found it worked pretty well once you knew what to modify along the way. 
I'd like to put together a tool to wrap Java2WSDL and WSDL2Java to make 
the process simpler, but don't know when I'll get to that.

  - Dennis

Dennis M. Sosnoski
Enterprise Java, XML, and Web Services Support
http://www.sosnoski.com


RE: rpc-encoded and document/literal

Posted by Anne Thomas Manes <an...@manes.net>.
See this:
http://searchwebservices.techtarget.com/ateQuestionNResponse/0,289625,sid26_
cid494324_tax289201,00.html

> -----Original Message-----
> From: Tim Russell [mailto:tim@yospace.com]
> Sent: Monday, November 18, 2002 1:17 PM
> To: axis-user@xml.apache.org
> Subject: Re: rpc-encoded and document/literal
>
>
> you might find
> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnweb
> srv/html/wsdlexplained.asp
> useful.
>
> Tim.
>
> ----- Original Message -----
> From: "Shriram Kollipara" <Sh...@motorola.com>
> To: <ax...@xml.apache.org>
> Sent: Monday, November 18, 2002 3:26 PM
> Subject: rpc-encoded and document/literal
>
>
> > Hi,
> >      I am trying to understand the differences between rpc-encoded
> and
> > document/literal. Any pointers regarding this including some books
> would
> > be of great help.
> >
> > Thanks.
> >
> > shri
> >
> --------------------------------------------------------------------
> Tim Russell, Technical Architect
> Yospace: Creating Value for Wireless
> 7 The Courtyard, High Street, Staines, UK, TW18 4DR
> Tel: +44 1784 466388
> Fax: +44 1784 466387
> http://www.yospace.com
>
> This e-mail and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. Any unauthorised dissemination or copying of this
> e-mail or its attachments, and any use or disclosure of any
> information contained in them, is strictly prohibited and may be
> illegal. If you have received the e-mail in error please notify
> contracts@yospace.com and delete it from your system.
>
>


Re: rpc-encoded and document/literal

Posted by Tim Russell <ti...@yospace.com>.
you might find
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnweb
srv/html/wsdlexplained.asp
useful.

Tim.

----- Original Message -----
From: "Shriram Kollipara" <Sh...@motorola.com>
To: <ax...@xml.apache.org>
Sent: Monday, November 18, 2002 3:26 PM
Subject: rpc-encoded and document/literal


> Hi,
>      I am trying to understand the differences between rpc-encoded
and
> document/literal. Any pointers regarding this including some books
would
> be of great help.
>
> Thanks.
>
> shri
>
--------------------------------------------------------------------
Tim Russell, Technical Architect
Yospace: Creating Value for Wireless
7 The Courtyard, High Street, Staines, UK, TW18 4DR
Tel: +44 1784 466388
Fax: +44 1784 466387
http://www.yospace.com

This e-mail and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. Any unauthorised dissemination or copying of this
e-mail or its attachments, and any use or disclosure of any
information contained in them, is strictly prohibited and may be
illegal. If you have received the e-mail in error please notify
contracts@yospace.com and delete it from your system.



rpc-encoded and document/literal

Posted by Shriram Kollipara <Sh...@motorola.com>.
Hi,
     I am trying to understand the differences between rpc-encoded and
document/literal. Any pointers regarding this including some books would
be of great help. 

Thanks.

shri

problems when deploying the sample applications

Posted by Shriram Kollipara <Sh...@motorola.com>.
Hi,
    I am running into the following error when I am trying to deploy
sample application:

/app/xml-axis-10/samples/echo> java -classpath
"../../lib/xerces.jar:.:../../lib/log4j-1.2.4.jar:../../lib/saaj.jar:../../lib/jaxrpc.jar:../../lib/commons-discovery.jar:../../lib/commons-logging.jar:../../lib/axis.jar"
org.apache.axis.client.AdminClient
-lhttp://localhost:1080/axis/services/AdminService deploy.wsdd 
- Processing file deploy.wsdd
- Exception:
AxisFault
 faultCode: {http://xml.apache.org/axis/}Server.userException
 faultString: org.xml.sax.SAXNotRecognizedException: Feature:
http://xml.org/sax/properties/lexical-handler
 faultActor: null
 faultDetail: 
        stackTrace: org.xml.sax.SAXNotRecognizedException: Feature:
http://xml.org/sax/properties/lexical-handler
        at
org.apache.xerces.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:155)
        at
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:231)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:546)
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:377)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2132)
        at org.apache.axis.client.Call.invoke(Call.java:2102)
        at org.apache.axis.client.Call.invoke(Call.java:1296)
        at
org.apache.axis.client.AdminClient.process(AdminClient.java:319)
        at
org.apache.axis.client.AdminClient.process(AdminClient.java:298)
        at
org.apache.axis.client.AdminClient.process(AdminClient.java:305)
        at
org.apache.axis.client.AdminClient.process(AdminClient.java:256)
        at org.apache.axis.client.AdminClient.main(AdminClient.java:341)


org.xml.sax.SAXNotRecognizedException: Feature:
http://xml.org/sax/properties/lexical-handler
org.xml.sax.SAXNotRecognizedException: Feature:
http://xml.org/sax/properties/lexical-handler
        at
org.apache.xerces.jaxp.SAXParserImpl.setProperty(SAXParserImpl.java:155)
        at
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationContextImpl.java:231)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:546)
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:377)
        at org.apache.axis.client.Call.invokeEngine(Call.java:2132)
        at org.apache.axis.client.Call.invoke(Call.java:2102)
        at org.apache.axis.client.Call.invoke(Call.java:1296)
        at
org.apache.axis.client.AdminClient.process(AdminClient.java:319)
        at
org.apache.axis.client.AdminClient.process(AdminClient.java:298)
        at
org.apache.axis.client.AdminClient.process(AdminClient.java:305)
        at
org.apache.axis.client.AdminClient.process(AdminClient.java:256)
        at org.apache.axis.client.AdminClient.main(AdminClient.java:341)



Can someone give some pointers to solve this. 

Thanks.
shri

Re: Web service from Java code - online example

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Stuart Halloway (DevelopMentor)" <st...@develop.com>
To: <ax...@xml.apache.org>
Sent: Saturday, November 02, 2002 09:16
Subject: RE: Web service from Java code - online example


> Hi Steve,
>
> Dennis:
> http://www.sosnoski.com/presents/java-xml/axis/axis-service.html)
>
> Stu:
> The whole process you describe can be automated with Ant. The toughest
> part (not that tough!) would be generating a transform to do step 4.
>
> Steve:
> that is for <replaceregexp>
>
> Stu replies:
> <replaceregexp> would be easy for one bean, but a little more work for a
> large design with an arbitrary number of beans, hence arbitrary number
> number of replacements to be made, not known in advance.

that'd be trickier

>
> Love your book btw.

why thank you. I am still getting back in to the notion of having weekends
and evenings without the stress of a spare time project, a kind of
authorship burn out.


RE: Web service from Java code - online example

Posted by "Stuart Halloway (DevelopMentor)" <st...@develop.com>.
Hi Steve,

Dennis:
http://www.sosnoski.com/presents/java-xml/axis/axis-service.html)

Stu:
The whole process you describe can be automated with Ant. The toughest
part (not that tough!) would be generating a transform to do step 4.

Steve:
that is for <replaceregexp>

Stu replies:
<replaceregexp> would be easy for one bean, but a little more work for a
large design with an arbitrary number of beans, hence arbitrary number
number of replacements to be made, not known in advance.
 
Love your book btw. 

Regards,
Stu

----------------------------------------------------------
Stuart Halloway         : staff.develop.com/halloway
DevelopMentor           : www.develop.com
Essential Java          : www.develop.com/courses/essjava
----------------------------------------------------------


Re: Web service from Java code - online example

Posted by Steve Loughran <st...@iseran.com>.
----- Original Message -----
From: "Stuart Halloway (DevelopMentor)" <st...@develop.com>
To: <ax...@xml.apache.org>
Sent: Friday, November 01, 2002 11:56 AM
Subject: RE: Web service from Java code - online example


> Hi Dennis,
>
> WRT making Java2WSDL and WSDL2Java simpler, what is wrong with the Ant
> tasks in axis-ant.jar?

These are now documented in CVS, BTW.

>
> The whole process you describe can be automated with Ant. The toughest
> part (not that tough!) would be generating a transform to do step 4.

that is for <replaceregexp>

...we really need an xdoclet task to generate WSDD Files. If wsdl2java could
generate xdoclet tags then it'd be easy to get started.


RE: Web service from Java code - online example

Posted by "Stuart Halloway (DevelopMentor)" <st...@develop.com>.
Hi Dennis,

WRT making Java2WSDL and WSDL2Java simpler, what is wrong with the Ant
tasks in axis-ant.jar?

The whole process you describe can be automated with Ant. The toughest
part (not that tough!) would be generating a transform to do step 4. 

Stu

----------------------------------------------------------
Stuart Halloway         : staff.develop.com/halloway
DevelopMentor           : www.develop.com
Essential Java          : www.develop.com/courses/essjava
----------------------------------------------------------

-----Original Message-----
From: Dennis Sosnoski [mailto:dms@sosnoski.com] 
Sent: Friday, November 01, 2002 1:23 PM
To: axis-user
Subject: Web service from Java code - online example

New users might be interested in an example I posted of using Axis to 
build a web service from existing Java code: 
http://www.sosnoski.com/presents/java-xml/axis/axis-service.html This 
uses the approach of Java->WSDL->Java, keeping the original code for the

server side and using the generated code for a test client.

I helped a client go through this process a couple of weeks ago and 
found it worked pretty well once you knew what to modify along the way. 
I'd like to put together a tool to wrap Java2WSDL and WSDL2Java to make 
the process simpler, but don't know when I'll get to that.

  - Dennis

Dennis M. Sosnoski
Enterprise Java, XML, and Web Services Support
http://www.sosnoski.com