RE: ms soap --> apache soap

2001-10-05 Thread Hansen, Richard

Here is a vb snippet that did it for me. I suppose the same set of calls
should work the same in C++.

  Serializer.startElement "string1"
  Serializer.SoapAttribute "type", , "xsd:string", "xsi"
  Serializer.writeString "client 1"
  Serializer.endElement

Rick Hansen

> We have been running an java apache soap client to a java 
> apache soap server
> successfully since it was owned by IBM. :-)
> 
> Well know we have a client that is a C++ shop and I have to 
> write a C++ soap
> client. Well, not write one, but use one. I have chosen the 
> MS Soap Toolkit.
> 
> 
> Without getting into the specifics - I know this is not the 
> MS SOAP tookit
> list - I would like to know if anyone out there has made this happen.
> 
> I am getting really close. However, the low-level ms soap api 
> don't let me
> specify a type of an element such as
> 
> aUserID
> 
> they only allow to specify a name, a namespace uri, an 
> encoding style, and a
> prefix.
> 
> aUserID
> 
> Is there a way to make these two forms say the same thing?
> 
> TIA,
> 
> Chris Bono
> [EMAIL PROTECTED]
> 512.531.8518
> http://www.zilliant.com
>  
> 



RE: Help with parameters in Apache SOAP client and .NET SOAP service

2001-10-05 Thread Steve Stacey
Title: RE: Help with parameters in Apache SOAP client and .NET SOAP service





I have a java SOAP 2.2 client talking to a .Net service. I did not have any problems with the Request, but the Response was a pain. After the .Net Service identified the response with a String attribute and I used the SOAPMappingRegistry, all was fine.

However with Regards to my Request code - I am not importing an XML doc, but constructing one using a Vector of Parameter objects. I do not specify an XSI within the params - only the element, class type, value and the Constants.NS_URI_SOAP_ENC encoding. So my client is essentially creating the same XML as your .Net friends want.

But on a philosophical note, it is the service that dictates the format of the Request. As lond as there is not MS proprietary plumbing, then why argue.

-Original Message-
From: John Bowen
To: soap user
Sent: 10/04/2001 3:09 PM
Subject: Help with parameters in Apache SOAP client and .NET SOAP service



  Hi all,


  I'm pulling my hair out trying to get my Apache SOAP [v2.2] client
working
with a .NET asmx service.


  When I send my SOAP request the server reads the parameters I'm
passing it
as null values and rejects my requests no matter what data I fill these
parameters with.  We're arguing back and forth on whose XML is at fault,
and
I need some opinions on if my client request is at least SOAPvalid or
not.


  Unfortunately the SOAP server isn't in-house, it's another company and
I
don't have control or can even snoop around the box.  After a few days
of
headaches and searching Google I did fix one of the interoperability
problems by creating a new StringDeserializer to get around that pesky
deserializer exception thrown when the .NET service doesn't return
xsi:type
information with the response.


  Here is the XML I'm sending as a request:


--
POST /userservice/userservice.asmx HTTP/1.0
Host: www.candyland.com
Content-Type: text/xml; charset=utf-8
Content-Length: 655
SOAPAction: "http://www.candyland.com/soap_MakeNewUser"




xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/1999/XMLSchema">

http://www.candyland.com"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
myUserName

xsi:type="xsd:string">myPassword

xsi:type="xsd:string">[EMAIL PROTECTED]



--


  The argument the .NET programmer makes is that his .NET server expects
just name, but the spec I read on w3.org tells me
there's no problem with including the xsi:type information in my
parameters.


  This shouldn't be this difficult, my code is based on the few examples
I've found on the net on doing this and it seems relatively
straightforward.


  Anyone with ideas or had similar problems with Apache SOAP clients and
.NET services before?


  - John





ms soap --> apache soap

2001-10-05 Thread Bono, Chris

We have been running an java apache soap client to a java apache soap server
successfully since it was owned by IBM. :-)

Well know we have a client that is a C++ shop and I have to write a C++ soap
client. Well, not write one, but use one. I have chosen the MS Soap Toolkit.


Without getting into the specifics - I know this is not the MS SOAP tookit
list - I would like to know if anyone out there has made this happen.

I am getting really close. However, the low-level ms soap api don't let me
specify a type of an element such as

aUserID

they only allow to specify a name, a namespace uri, an encoding style, and a
prefix.

aUserID

Is there a way to make these two forms say the same thing?

TIA,

Chris Bono
[EMAIL PROTECTED]
512.531.8518
http://www.zilliant.com
 



Parsing the S:Body XML within a SOAP request.

2001-10-05 Thread Dahnke, Eric


Hello when going through ../soap-2_2/samples/messaging/POProcessor

package samples.messaging;
import java.io.*;
import org.apache.soap.*;
import org.apache.soap.rpc.SOAPContext;
import javax.mail.MessagingException;

public class POProcessor {
  public void purchaseOrder (Envelope env, SOAPContext reqCtx,
   SOAPContext resCtx)
throws MessagingException, IOException {
resCtx.setRootPart("OK. Original XML received.","text/xml");
  }

  public void bustedRequest (Envelope env, SOAPContext reqCtx,
   SOAPContext resCtx)
throws Exception {
throw new IllegalArgumentException ("Broken SOAP v1.1 Request.");
  }
}


In the org.apache.soap.messaging.Message class what method would I use to
read/receive the XML contained in S:Body. I've got a SAXParseHandler class
that can read in (parse) an XML input stream from a URL or a local file.

You see what I what to do here. Can anyone point me in the right direction?


Regards, Eric



RE: WSDL Problem

2001-10-05 Thread Neil Smyth

I've had the same problem when using the wsdl4j toolkit. If you step through
the Definition returned from the wsdl4j toolkit, you'll find that it doesn't
find the referenced binding node - because it is looking in a different
namespace. I've found this problem with a good subset of the wsdl files from
xmethods.

Given that you are generating the wsdl from another tool in the wstk, I'd
classify it as a bug with the generating tool. I'm also not sure about what
the correct syntax as per the wsdl spec is, anyone have any pointers on
that? Should the binding reference always be namespace qualified or not?

If you can find an easy way around this please let me know! I've resorted to
doing basic xml tree searching for the time being which is far from ideal :)

Regards, 

Neil

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: 05 October 2001 17:24
To: [EMAIL PROTECTED]
Subject: WSDL Problem




Hi

I have created a java class which has one method square taking a double and
returning a double.  I have deployed this class to SOAP.
I have genereated WSDL via IBM wstk tool. I am using WSIF to try and
dynamically
read the WSDL and invoke the method,  but I cant seem to call it without
making
some changes to the WSDL that was generated.

If I add "tns:" to port binding i.e. 


weblogic6.1sp1 exception with version 2.2

2001-10-05 Thread Tony Yip

hi

does anyone encounter this problem?  I am using weblogic 6.1sp1 with apache
soap 2.2.  The function of the webservice is very simple as follow

public class testWebService
{
  public String getXML (String xml) throws Exception
  {
   System.out.println("received message");
   System.out.println(xml);
   return "ok";
  }
}


java.lang.NullPointerException
at weblogic.servlet.internal.ChunkOutput.clearBuffer
(ChunkOutput.java:231)
at weblogic.servlet.internal.ChunkOutput.flush(Chunk
Output.java:251)
at weblogic.servlet.internal.ChunkOutputWrapper.flus
h(ChunkOutputWrapper.java:152)
at weblogic.servlet.internal.ServletOutputStreamImpl
.flush(ServletOutputStreamImpl.java:119)
at org.apache.soap.transport.TransportMessage.writeT
o(TransportMessage.java:462)
at org.apache.soap.server.http.RPCRouterServlet.doPo
st(RPCRouterServlet.java:347)
at javax.servlet.http.HttpServlet.service(HttpServle
t.java:760)
at javax.servlet.http.HttpServlet.service(HttpServle
t.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeS
ervlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeS
ervlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.in
vokeServlet(WebAppServletContext.java:2456)
at weblogic.servlet.internal.ServletRequestImpl.exec
ute(ServletRequestImpl.java:2039)
at weblogic.kernel.ExecuteThread.execute(ExecuteThre
ad.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.j
ava:120)
   <[WebAppServlet
Context(6898114,soap,/soap)] Servlet failed with ServletExce
ption
javax.servlet.ServletException: Error building response enve
lope: java.lang.NullPointerException
at org.apache.soap.server.http.RPCRouterServlet.doPo
st(RPCRouterServlet.java:353)
at javax.servlet.http.HttpServlet.service(HttpServle
t.java:760)
at javax.servlet.http.HttpServlet.service(HttpServle
t.java:853)
at weblogic.servlet.internal.ServletStubImpl.invokeS
ervlet(ServletStubImpl.java:265)
at weblogic.servlet.internal.ServletStubImpl.invokeS
ervlet(ServletStubImpl.java:200)
at weblogic.servlet.internal.WebAppServletContext.in
vokeServlet(WebAppServletContext.java:2456)
at weblogic.servlet.internal.ServletRequestImpl.exec
ute(ServletRequestImpl.java:2039)
at weblogic.kernel.ExecuteThread.execute(ExecuteThre
ad.java:139)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.j
ava:120)
>>>




WSDL Problem

2001-10-05 Thread keith.watt



Hi

I have created a java class which has one method square taking a double and
returning a double.  I have deployed this class to SOAP.
I have genereated WSDL via IBM wstk tool. I am using WSIF to try and dynamically
read the WSDL and invoke the method,  but I cant seem to call it without making
some changes to the WSDL that was generated.

If I add "tns:" to port binding i.e. 
 MathX.wsdl


RE: Weblogic6.1 and SOAP

2001-10-05 Thread Amila Norbert

Thanks Eric. The problem I am having with Weblogic ont with tomcat. I got
everyting to work on tomcat.  I have my cliet and
server classes in jar files and have palced them in the corresponding lib
directories as well.  Is there any weblogic configurations I have missed
here?

Amila.

-Original Message-
From: Dahnke, Eric [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 05, 2001 4:00 PM
To: '[EMAIL PROTECTED]'
Subject: RE: Weblogic6.1 and SOAP



I went through similar setups yesterday, and everything worked great once I
have all the appropriate jars and classes in my classpath. It appears that
if you change your classpath environment variable, you should stop and start
tomcat too.



-Original Message-
From: Amila Norbert [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 05, 2001 6:34 AM
To: [EMAIL PROTECTED]
Subject: Weblogic6.1 and SOAP



Hi,

I have successfully deployed my User stuff in weblogic6.1 as can be seen
from the http://localhost:7001/soap/admin/index.html .However when I to test
running my test program I get the below given error.

Generated fault:
  Fault Code   = SOAP-ENV:Client
  Fault String = Deployment error in SOAP service 'urn:User': class name
'com.accelrys.UserData' could not be
resolved: com.accelrys.UserData

I have attached the deployment descriptor as well.  I was able to run the
same program on tomcat.

Any suggestions please.

Amila.








RE: Weblogic6.1 and SOAP

2001-10-05 Thread Dahnke, Eric


I went through similar setups yesterday, and everything worked great once I
have all the appropriate jars and classes in my classpath. It appears that
if you change your classpath environment variable, you should stop and start
tomcat too.



-Original Message-
From: Amila Norbert [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 05, 2001 6:34 AM
To: [EMAIL PROTECTED]
Subject: Weblogic6.1 and SOAP



Hi,

I have successfully deployed my User stuff in weblogic6.1 as can be seen
from the http://localhost:7001/soap/admin/index.html .However when I to test
running my test program I get the below given error.

Generated fault:
  Fault Code   = SOAP-ENV:Client
  Fault String = Deployment error in SOAP service 'urn:User': class name
'com.accelrys.UserData' could not be
resolved: com.accelrys.UserData

I have attached the deployment descriptor as well.  I was able to run the
same program on tomcat.

Any suggestions please.

Amila.








Compression

2001-10-05 Thread Robert . Schmitt


It seems that the problem that string packet time grows exponentially still
exists in the SOAP implementation;
one idea I came up with is to apply a simple window compression - it helps
if your packets are very redundant
anyway. You'll find the code snippet implementing a simple LZ77 derivate
below. Since SOAP uses an XML
framework, you will always have to recode compressed/binary data, so you
end up blowing up your
compressed packet a little :-| Still the result is smaller than the
original by a factor of 20..80%.

Mind you that this does not solve the actual problem, it may only leviate
it - there has been an ongoing discussion about it
on this mailing list. If anyone has come up with a good idea in the
meantime, please post it. The best thing we could think
of was to use either FTP or return a URL that the client can use to access
the result (which is made available by
a servlet that communicates with the SOAP server class implementation) -
should work since the Apache SOAP
implementation needs the servlet runner anyway in order to provide the RPC
access point.

Robert F Schmitt, CellZome
Meyerhofstr. 1, D-69117 Heidelberg, Germany
Tel + 49 6221 137 570 , Fax + 49 6221 137 57 202
www.cellzome.com


"The idea is that we do whatever is most important - not necessarily most
urgent. Sun has 20,000 other people doing that.
I left the urgent behind to get to the important."
Bill Joy (Sun Microsystems)

"When you attack something with a particular technology--a
hammer--everything looks like a nail,
but that's not necessarily the right answer"
Ajei Gopai (IBM CTO)


  static StringBuffer m_compressedPacket = new StringBuffer();

  /**
   * auxiliary function that computes the hexadecimal nibble-wise
   * representation of an integer
   */
  static void addHexNibbles(int number, int nrOfNibbles) {
char digit;
char returnChars[] = new char[nrOfNibbles];

for(int nibbleCnt=0;nibbleCnt9) {
digit = (char)('A'+digit);
  } else {
digit = (char)('0'+digit);
  }

  returnChars[nrOfNibbles-nibbleCnt-1] = digit;

  number >>= 4;
}

m_compressedPacket.append(returnChars);
  }

  /**
   * apply a simple LZ77 derivate on the given packet
   */
  static String getCompressedPacket(String inPacket) {
int refIndex;
int lastRefIndex;
int lengthCnt;
int refLength;
int inPacketLength = inPacket.length();

for(int chrPos=0;chrPos longer strings cannot
start before that position
  refIndex = inPacket.indexOf(inPacket.substring(chrPos,
chrPos+lengthCnt), lastRefIndex);

if(refIndex+lengthCnt>chrPos) //catch overlaps like \window{XXAAA}
\curpos{XX} => would return !
  refIndex = -1;

if(refIndex==-1)
  break;
  }

  if(lastRefIndex!=-1) { //repetition block found?
refLength = lengthCnt-1;//since the last iteration's length was
already too long
lastRefIndex = chrPos - lastRefIndex; //relative index to current
position
char reference[] = { (char)(lastRefIndex/256),
(char)(lastRefIndex%256), (char)(refLength%256) };
m_compressedPacket.append('\007');
addHexNibbles(lastRefIndex, 3);
addHexNibbles(refLength, 2);
chrPos += refLength;
  }
  else if(inPacket.charAt(chrPos)=='\007') { //quote the quote
char reference[] = { 0, 0, 1 };
m_compressedPacket.append('\007');
addHexNibbles(0, 3);
addHexNibbles(1, 2);
chrPos += 1;
  }
  else { //nothing found, nothing to be quoted
m_compressedPacket.append(inPacket.charAt(chrPos));
chrPos += 1;
  }
}//for all characters

return m_compressedPacket.toString();
  }//getCompressedPacket





Re: High and Low Level Api

2001-10-05 Thread Carlos Vinueza M.



It's not directly SOAP related, it has relation with the two ways you could
use the MS SOAP Toolkit.
Check the samples.
Regards
Bineet Basant wrote:

hello, can
anyone tell what is High level api and Low level api in soap. regardsbineet

--
Carlos Vinueza M.
Director Comercial
VIMEWorks Cia. Ltda.
Construyendo Sueños en Internet
(CEL)  (593)(9)9703-375
(OFIC) (593)(2)2237-784 / (593)(2)2903-925
 




RE: SOAP..I want more

2001-10-05 Thread Francis Ho

At this point, it is basically up to you:
how you write and configure your services.

sometime in the future, I can envision a more advanced SOAP service
container that does things like activation and passivation.


francis


>> -Original Message-
>> From: Gaurav [mailto:[EMAIL PROTECTED]]
>> Sent: Friday, October 05, 2001 6:29 AM
>> To: [EMAIL PROTECTED]
>> Subject: SOAP..I want more
>>
>>
>> Hi SOAPers,
>>
>>  We know that SOAP does not have sophisticated facilities like
>> distributed
>> garbage collection, object by reference passing etc like other
>> wire protocol
>> (JRMP, ORPC etc). But then how do we take care of things like distributed
>> garbage collection in webservices?? Anybody has any idea!!
>>
>> Thanks.
>>
>>




unsubscribe me

2001-10-05 Thread Michael Svoboda

 



Weblogic6.1 and SOAP

2001-10-05 Thread Amila Norbert


Hi,

I have successfully deployed my User stuff in weblogic6.1 as can be seen
from the http://localhost:7001/soap/admin/index.html .However when I to test
running my test program I get the below given error.

Generated fault:
  Fault Code   = SOAP-ENV:Client
  Fault String = Deployment error in SOAP service 'urn:User': class name
'com.accelrys.UserData' could not be
resolved: com.accelrys.UserData

I have attached the deployment descriptor as well.  I was able to run the
same program on tomcat.

Any suggestions please.

Amila.







http://xml.apache.org/xml-soap/deployment";
 id="urn:User">
  

  

  org.apache.soap.server.DOMFaultListener
  
  
  http://schemas.xmlsoap.org/soap/encoding/";
   xmlns:x="urn:xml-UserData" qname="x:udat"
   javaType="com.accelrys.UserData"
   java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
   xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
   
  http://schemas.xmlsoap.org/soap/encoding/";
 xmlns:x="urn:xml-Name" qname="x:n"
 javaType="com.accelrys.Name"
 java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
   xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
  
   

 




SOAP..I want more

2001-10-05 Thread Gaurav

Hi SOAPers,

 We know that SOAP does not have sophisticated facilities like distributed
garbage collection, object by reference passing etc like other wire protocol
(JRMP, ORPC etc). But then how do we take care of things like distributed
garbage collection in webservices?? Anybody has any idea!!

Thanks.





Re: MS-SOAP with SSL

2001-10-05 Thread Putti Tang.

Hello,
Now I can solve this problem. You have to install SSL on SERVER and
CLIENT, too. The problem is about hostname. Don't use "localhost" or any
IP-Address when you refer to WSDL url, use the one you have registered to
Verisign.
and don't forget to edit your WSDL file, too.

Suppose my hostname is "p800". When I refer to WSDL url. I use
http://p800/mysoap
DO NOT use http://localhost/mysoap

Good luck, now I can hope everyone can do it, too.

Putti T.

- Original Message -
From: "Hartmut Bernecker" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, October 05, 2001 3:12 PM
Subject: Re: MS-SOAP with SSL


> Hello,
>
> I seem to have the same problem, but no answer. Is there anybody who has
> made work such a constellation?
>
> Hartmut
>
> "Putti Tang." wrote:
> >
> > Hello,
> > I have set up SSL on my IIS but I can't use SOAPClient to connect to
> > WSDL via "https". It shows me the error about Security. Have anyone
found
> > this problem like me?
> > How can I fixed it?  Thanks in advance.
> >
> > Putti Tang.
>



unsubscribe me

2001-10-05 Thread Chris Seldon

Please, unsubscribe me.




Re: High and Low Level Api

2001-10-05 Thread Bineet Basant



hi,
 
thanxs a lot jean that was really very 
informative.
 
regards
bineet

  - Original Message - 
  From: 
  Jean-Louis 
  Vila 
  To: [EMAIL PROTECTED] 
  Sent: Friday, October 05, 2001 1:20 
  PM
  Subject: RE: High and Low Level Api
  
  Hi,
   
  SOAP is an XML RPC 
  protocol.
  So, you have the 
  schema of SOAP message and you can 
  use XML parser to 
  send, receive and analyse SOAP
  message, wich is 
  boring !!
  All SOAP actors 
  (MS, IBM) make severals API to help
  developpers. 
  
  In general you 
  find 2 level API:
      
  Low: You'll find methods like makeHeader(..), 
makeBody(...)
      
  --> You have to know the SOAP message structure
      
  High: You known nothing about SOAP Message but you have
      
  a WSDL file. In this case, in few lines, you can invoke a 
  service.
      
  1st line: Get the WSDL description file
      
  MS: mssoapinit(...)
      
  IBM: ServiceProxyFactory.getServiceProxy(service, port, 
  wsdl);
      
  2nd line: Invoke a method from the previous build proxy
  MS: 
  myProxy.getName()    
  
      
  IBM: myProxy.invoke("getName",args);
  Hope that 
  helps
  Jean-Louis

---
Information transmitted by this E-MAIL is proprietary to Wipro and/or its Customers and
is intended for use only by the individual or entity to which it is
addressed, and may contain information that is privileged, confidential or
exempt from disclosure under applicable law. If you are not the intended
recipient or it appears that this mail has been forwarded to you without
proper authority, you are notified that any use or dissemination of this
information in any manner is strictly prohibited. In such cases, please
notify us immediately at mailto:[EMAIL PROTECTED] and delete this mail
from your records.




Re: MS-SOAP with SSL

2001-10-05 Thread Hartmut Bernecker

Hello, 

I seem to have the same problem, but no answer. Is there anybody who has
made work such a constellation?

Hartmut

"Putti Tang." wrote:
> 
> Hello,
> I have set up SSL on my IIS but I can't use SOAPClient to connect to
> WSDL via "https". It shows me the error about Security. Have anyone found
> this problem like me?
> How can I fixed it?  Thanks in advance.
> 
> Putti Tang.



RE: High and Low Level Api

2001-10-05 Thread Jean-Louis Vila



Hi,
 
SOAP is an XML RPC 
protocol.
So, you have the 
schema of SOAP message and you can 
use XML parser to 
send, receive and analyse SOAP
message, wich is 
boring !!
All SOAP actors (MS, 
IBM) make severals API to help
developpers. 

In general you find 
2 level API:
    
Low: You'll find methods like makeHeader(..), makeBody(...)
    
--> You have to know the SOAP message structure
    
High: You known nothing about SOAP Message but you have
    
a WSDL file. In this case, in few lines, you can invoke a 
service.
    
1st line: Get the WSDL description file
    
MS: mssoapinit(...)
    
IBM: ServiceProxyFactory.getServiceProxy(service, port, 
wsdl);
    
2nd line: Invoke a method from the previous build proxy
MS: 
myProxy.getName()    

    
IBM: myProxy.invoke("getName",args);
Hope that 
helps
Jean-Louis