You are viewing a plain text version of this content. The canonical link for it is here.
Posted to soap-user@ws.apache.org by Klaus Thiele <kt...@pi-ag.com> on 2001/01/31 11:46:04 UTC

Newbi-Question

Hello,

i've sucessfully set up Apache-Soap with the
Orion-AppServer and have just finished my first
"Soap-Service" and a Java-Client :))

Now i want to know, if it is possible to access the
Soap-Services from Windows-Clients?

What did i need for this?
(i have the MS-Soap Toolkit 2.0 Beta 1, is that all?)
But i don't see anything which looks like the Java-Samples!?

Is there a HowTo or MailArchive available?

Please point me in the right direction.

Thanks a lot

   Klaus

--
Klaus Thiele - Personal & Informatik AG
mailto:kth@pi-ag.com

  "There's got to be more to life than compile-and-go."


Re: I'm still getting the error with soap on JRun3.0 + Apache

Posted by William Brogden <wb...@bga.com>.

fumitada wrote:
> 
> Hi there,
> 
> I'm still getting errors with soap on JRun3.0...
> 
> anybody can share the detail info of installing Soap into JRun with me ?
> 
> I guess I successfully installed soap into JRun3.0 developer Edition (localhost,apache(win98)),
> according to "I don't speak via GET,....", when I access
> http://localhost/xml-soap/servlet/rpcrouter.
> 
> but when I tried to use a simple code that works fine with Tomcat on
> Apache(localhost), I get a bunch of errors...
> 
> Please help me out...please...
> 
> Fumitada Hattori.
> 

It is very likely a problem with JRun finding other XML parsing
libraries before it finds Xerces.jar.  In my case I had to remove
jaxp.jar and parser.jar from the  JDK1.2\jre\lib\ext   directory.

Re: I'm still getting the error with soap on JRun3.0 + Apache

Posted by fumitada <fu...@earthlink.net>.
Hi Glen,

I copied my client code and errors to bottom of this email.

I just tried to change(put 3 Rs at the end of url) the argument for URL
object to get error on purpose. kinda curious what kinda errors I get.

I changed URL("http://localhost/xml-soap/servlet/rpcrouter")
to URL("http://localhost/xml-soap/servlet/rpcrouterRRR");

and I tried.
I GOT THE SAME ERROR !!

According to that, I think JRun is okay, but something wrong with client
?? hm...but the code works fine with Tomcat...

// My Code-----------------------------------------

import java.net.*; 
 import java.util.*; 
 import org.apache.soap.*; // Body, Envelope, Fault, Header 
 import org.apache.soap.rpc.*; // Call, Parameter, Response 

 public class Client 
   { 
   public static void main( String[] args ) throws Exception 
     { 
     URL url = new URL( "http://localhost/xml-soap/servlet/rpcrouter" ); 
     String urn = "urn:soap-2_0:jpcharr"; 

     Call call = new Call(); // prepare the service invocation 
     call.setTargetObjectURI( urn ); 
     call.setMethodName( "con" ); 
     call.setEncodingStyleURI( Constants.NS_URI_SOAP_ENC ); 
     Vector params = new Vector(); 
     params.addElement( new Parameter( "first", String.class, "Hattori", null ) ); 
     params.addElement( new Parameter( "second", String.class, "Fumitada", null ) ); 
     call.setParams( params ); 

     try 
       { 
       System.out.println( "invoke service\n" + "  URL= " + url + "\n  URN =" + 
          urn ); 
       Response response = call.invoke( url, "" ); // invoke the service 

       if( !response.generatedFault() ) 
         { 
         Parameter result = response.getReturnValue(); // response was OK 
         System.out.println( "Result= " + result.getValue() ); 
         } 
       else 
         { 
         Fault f = response.getFault(); // an error occurred 
         System.err.println( "Fault= " + f.getFaultCode() + ", " + 
           f.getFaultString() );
         } 
       } 
     catch( SOAPException e ) // call could not be sent properly 
       { 
       System.err.println( "SOAPException= " + e.getFaultCode() + ", " +  
         e.getMessage() ); 
       } 
     } 
   } 


// Error-------------------------------------------
org.xml.sax.SAXParseException: White space is required between the
public identi
fier and the system identifier.
        at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1056
)
        at org.apache.xerces.framework.XMLDTDScanner.reportFatalXMLError(XMLDTDS
canner.java:651)
        at org.apache.xerces.framework.XMLDTDScanner.scanExternalID(XMLDTDScanne
r.java:1198)
        at org.apache.xerces.framework.XMLDTDScanner.scanDoctypeDecl(XMLDTDScann
er.java:1104)
        at org.apache.xerces.framework.XMLDocumentScanner.scanDoctypeDecl(XMLDoc
umentScanner.java:2192)
        at org.apache.xerces.framework.XMLDocumentScanner.access$000(XMLDocument
Scanner.java:86)
        at org.apache.xerces.framework.XMLDocumentScanner$XMLDeclDispatcher.disp
atch(XMLDocumentScanner.java:776)
        at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS
canner.java, Compiled Code)
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:948)
        at org.apache.soap.util.xml.XercesParserLiaison.read(XercesParserLiaison
.java:85)
        at org.apache.soap.rpc.Call.invoke(Call.java:157)
		at Client.main(Client.java:26)
SOAPException= SOAP-ENV:Protocol, <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//
EN">
<HTML><HEAD>
<TITLE>400 Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that this server could not understand.<P>
Client sent malformed Host header<P>
<HR>
<ADDRESS>Apache/1.3.12 Server at ........... Port 80</ADDRESS>
</BODY></HTML>



Fumitada Hattori.

Re: I'm still getting the error with soap on JRun3.0 + Apache

Posted by fumitada <fu...@earthlink.net>.
Thanks Glen so quick response again.

Unfortuna... Even though I put xerces.jar at the beginning of
java.classpath in the global.properties, I'm getting errors...

I guess I miscofigured when xml-soap deployed by JRun...

I'll make Jrun deploy xml-soap again.

Fumitada Hattori.

Re: I'm still getting the error with soap on JRun3.0 + Apache

Posted by fumitada <fu...@earthlink.net>.
Hi Glen,

I copied my client code and errors to bottom of this email.

I just tried to change(put 3 Rs at the end of url) the argument for URL
object to get error on purpose. kinda curious what kinda errors I get.

I changed URL("http://localhost/xml-soap/servlet/rpcrouter")
to URL("http://localhost/xml-soap/servlet/rpcrouterRRR");

and I tried.
I GOT THE SAME ERROR !!

According to that, I think JRun is okay, but something wrong with client
?? hm...but the code works fine with Tomcat...

// My Code-----------------------------------------

import java.net.*; 
 import java.util.*; 
 import org.apache.soap.*; // Body, Envelope, Fault, Header 
 import org.apache.soap.rpc.*; // Call, Parameter, Response 

 public class Client 
   { 
   public static void main( String[] args ) throws Exception 
     { 
     URL url = new URL( "http://localhost/xml-soap/servlet/rpcrouter" ); 
     String urn = "urn:soap-2_0:jpcharr"; 

     Call call = new Call(); // prepare the service invocation 
     call.setTargetObjectURI( urn ); 
     call.setMethodName( "con" ); 
     call.setEncodingStyleURI( Constants.NS_URI_SOAP_ENC ); 
     Vector params = new Vector(); 
     params.addElement( new Parameter( "first", String.class, "Hattori", null ) ); 
     params.addElement( new Parameter( "second", String.class, "Fumitada", null ) ); 
     call.setParams( params ); 

     try 
       { 
       System.out.println( "invoke service\n" + "  URL= " + url + "\n  URN =" + 
          urn ); 
       Response response = call.invoke( url, "" ); // invoke the service 

       if( !response.generatedFault() ) 
         { 
         Parameter result = response.getReturnValue(); // response was OK 
         System.out.println( "Result= " + result.getValue() ); 
         } 
       else 
         { 
         Fault f = response.getFault(); // an error occurred 
         System.err.println( "Fault= " + f.getFaultCode() + ", " + 
           f.getFaultString() );
         } 
       } 
     catch( SOAPException e ) // call could not be sent properly 
       { 
       System.err.println( "SOAPException= " + e.getFaultCode() + ", " +  
         e.getMessage() ); 
       } 
     } 
   } 


// Error-------------------------------------------
org.xml.sax.SAXParseException: White space is required between the
public identi
fier and the system identifier.
        at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1056
)
        at org.apache.xerces.framework.XMLDTDScanner.reportFatalXMLError(XMLDTDS
canner.java:651)
        at org.apache.xerces.framework.XMLDTDScanner.scanExternalID(XMLDTDScanne
r.java:1198)
        at org.apache.xerces.framework.XMLDTDScanner.scanDoctypeDecl(XMLDTDScann
er.java:1104)
        at org.apache.xerces.framework.XMLDocumentScanner.scanDoctypeDecl(XMLDoc
umentScanner.java:2192)
        at org.apache.xerces.framework.XMLDocumentScanner.access$000(XMLDocument
Scanner.java:86)
        at org.apache.xerces.framework.XMLDocumentScanner$XMLDeclDispatcher.disp
atch(XMLDocumentScanner.java:776)
        at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentS
canner.java, Compiled Code)
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:948)
        at org.apache.soap.util.xml.XercesParserLiaison.read(XercesParserLiaison
.java:85)
        at org.apache.soap.rpc.Call.invoke(Call.java:157)
		at Client.main(Client.java:26)
SOAPException= SOAP-ENV:Protocol, <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//
EN">
<HTML><HEAD>
<TITLE>400 Bad Request</TITLE>
</HEAD><BODY>
<H1>Bad Request</H1>
Your browser sent a request that this server could not understand.<P>
Client sent malformed Host header<P>
<HR>
<ADDRESS>Apache/1.3.12 Server at ........... Port 80</ADDRESS>
</BODY></HTML>



Fumitada Hattori.

Re: I'm still getting the error with soap on JRun3.0 + Apache

Posted by fumitada <fu...@earthlink.net>.
Thanks Glen so quick response again.

Unfortuna... Even though I put xerces.jar at the beginning of
java.classpath in the global.properties, I'm getting errors...

I guess I miscofigured when xml-soap deployed by JRun...

I'll make Jrun deploy xml-soap again.

Fumitada Hattori.

Re: I'm still getting the error with soap on JRun3.0 + Apache

Posted by Glen Daniels <gd...@allaire.com>.
Yup, jrun.classpath should work, as it's the first thing in
java.classpath...

However, try switching it anyways and see if that helps (i.e. put xerces.jar
at the beginning of java.classpath and shut down / restart your JRun
servers).

--Glen

----- Original Message -----
From: "fumitada" <fu...@earthlink.net>
To: <so...@xml.apache.org>
Sent: Wednesday, January 31, 2001 8:15 AM
Subject: Re: I'm still getting the error with soap on JRun3.0 + Apache


> Thank you glen for replying so quick.
>
> My xerces.jar is at the beginning of java.classpath in
global.properties...???
> Wait!!!
> java.classpath ?? When I read your doc(
http://archive.covalent.net/xml/soap-user/2000/09/0083.xml
> ), it says jrun.classpath.
>
> java.classpath or jrun.classpath ??
>
> my xerces.jar is in jrun.classpath in global.properties.
>
>
> Fumitada Hattori.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>


Re: I'm still getting the error with soap on JRun3.0 + Apache

Posted by Glen Daniels <gd...@allaire.com>.
Yup, jrun.classpath should work, as it's the first thing in
java.classpath...

However, try switching it anyways and see if that helps (i.e. put xerces.jar
at the beginning of java.classpath and shut down / restart your JRun
servers).

--Glen

----- Original Message -----
From: "fumitada" <fu...@earthlink.net>
To: <so...@xml.apache.org>
Sent: Wednesday, January 31, 2001 8:15 AM
Subject: Re: I'm still getting the error with soap on JRun3.0 + Apache


> Thank you glen for replying so quick.
>
> My xerces.jar is at the beginning of java.classpath in
global.properties...???
> Wait!!!
> java.classpath ?? When I read your doc(
http://archive.covalent.net/xml/soap-user/2000/09/0083.xml
> ), it says jrun.classpath.
>
> java.classpath or jrun.classpath ??
>
> my xerces.jar is in jrun.classpath in global.properties.
>
>
> Fumitada Hattori.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>


Re: I'm still getting the error with soap on JRun3.0 + Apache

Posted by fumitada <fu...@earthlink.net>.
Thank you glen for replying so quick.

My xerces.jar is at the beginning of java.classpath in global.properties...???
Wait!!!
java.classpath ?? When I read your doc( http://archive.covalent.net/xml/soap-user/2000/09/0083.xml
), it says jrun.classpath.

java.classpath or jrun.classpath ??

my xerces.jar is in jrun.classpath in global.properties.


Fumitada Hattori.


Re: I'm still getting the error with soap on JRun3.0 + Apache

Posted by fumitada <fu...@earthlink.net>.
Thank you glen for replying so quick.

My xerces.jar is at the beginning of java.classpath in global.properties...???
Wait!!!
java.classpath ?? When I read your doc( http://archive.covalent.net/xml/soap-user/2000/09/0083.xml
), it says jrun.classpath.

java.classpath or jrun.classpath ??

my xerces.jar is in jrun.classpath in global.properties.


Fumitada Hattori.


Re: I'm still getting the error with soap on JRun3.0 + Apache

Posted by Glen Daniels <gd...@allaire.com>.
Hi Fumitada:

You were having the problem with JRun returning an HTTP error instead of the
expected XML, right?  We've seen several cases of this same thing and the
problem was always a classpath issue.  I would bet that somewhere on your
classpath you have a non-Xerces parser.  Is a current version of Xerces the
FIRST thing on your java.classpath in JRun's global.properties file?

--Glen

----- Original Message -----
From: "fumitada" <fu...@earthlink.net>
To: <so...@xml.apache.org>
Sent: Wednesday, January 31, 2001 7:07 AM
Subject: I'm still getting the error with soap on JRun3.0 + Apache


> Hi there,
>
> I'm still getting errors with soap on JRun3.0...
>
> anybody can share the detail info of installing Soap into JRun with me ?
>
> I guess I successfully installed soap into JRun3.0 developer Edition
(localhost,apache(win98)),
> according to "I don't speak via GET,....", when I access
> http://localhost/xml-soap/servlet/rpcrouter.
>
> but when I tried to use a simple code that works fine with Tomcat on
> Apache(localhost), I get a bunch of errors...
>
> Please help me out...please...
>
>
> Fumitada Hattori.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>


Re: I'm still getting the error with soap on JRun3.0 + Apache

Posted by Glen Daniels <gd...@allaire.com>.
Hi Fumitada:

You were having the problem with JRun returning an HTTP error instead of the
expected XML, right?  We've seen several cases of this same thing and the
problem was always a classpath issue.  I would bet that somewhere on your
classpath you have a non-Xerces parser.  Is a current version of Xerces the
FIRST thing on your java.classpath in JRun's global.properties file?

--Glen

----- Original Message -----
From: "fumitada" <fu...@earthlink.net>
To: <so...@xml.apache.org>
Sent: Wednesday, January 31, 2001 7:07 AM
Subject: I'm still getting the error with soap on JRun3.0 + Apache


> Hi there,
>
> I'm still getting errors with soap on JRun3.0...
>
> anybody can share the detail info of installing Soap into JRun with me ?
>
> I guess I successfully installed soap into JRun3.0 developer Edition
(localhost,apache(win98)),
> according to "I don't speak via GET,....", when I access
> http://localhost/xml-soap/servlet/rpcrouter.
>
> but when I tried to use a simple code that works fine with Tomcat on
> Apache(localhost), I get a bunch of errors...
>
> Please help me out...please...
>
>
> Fumitada Hattori.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: soap-user-unsubscribe@xml.apache.org
> For additional commands, email: soap-user-help@xml.apache.org
>


Re: I'm still getting the error with soap on JRun3.0 + Apache

Posted by William Brogden <wb...@bga.com>.

fumitada wrote:
> 
> Hi there,
> 
> I'm still getting errors with soap on JRun3.0...
> 
> anybody can share the detail info of installing Soap into JRun with me ?
> 
> I guess I successfully installed soap into JRun3.0 developer Edition (localhost,apache(win98)),
> according to "I don't speak via GET,....", when I access
> http://localhost/xml-soap/servlet/rpcrouter.
> 
> but when I tried to use a simple code that works fine with Tomcat on
> Apache(localhost), I get a bunch of errors...
> 
> Please help me out...please...
> 
> Fumitada Hattori.
> 

It is very likely a problem with JRun finding other XML parsing
libraries before it finds Xerces.jar.  In my case I had to remove
jaxp.jar and parser.jar from the  JDK1.2\jre\lib\ext   directory.

I'm still getting the error with soap on JRun3.0 + Apache

Posted by fumitada <fu...@earthlink.net>.
Hi there,

I'm still getting errors with soap on JRun3.0...

anybody can share the detail info of installing Soap into JRun with me ?

I guess I successfully installed soap into JRun3.0 developer Edition (localhost,apache(win98)),
according to "I don't speak via GET,....", when I access
http://localhost/xml-soap/servlet/rpcrouter.

but when I tried to use a simple code that works fine with Tomcat on
Apache(localhost), I get a bunch of errors...

Please help me out...please...


Fumitada Hattori.

I'm still getting the error with soap on JRun3.0 + Apache

Posted by fumitada <fu...@earthlink.net>.
Hi there,

I'm still getting errors with soap on JRun3.0...

anybody can share the detail info of installing Soap into JRun with me ?

I guess I successfully installed soap into JRun3.0 developer Edition (localhost,apache(win98)),
according to "I don't speak via GET,....", when I access
http://localhost/xml-soap/servlet/rpcrouter.

but when I tried to use a simple code that works fine with Tomcat on
Apache(localhost), I get a bunch of errors...

Please help me out...please...


Fumitada Hattori.