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 Siddhartha Mehta <si...@yahoo.com> on 2002/12/18 00:55:09 UTC

Using DateTime object

I am using C# webservice and a Java client. One of the functions in my webservice expects a DateTime (C# object). How would I send a datetime object from my Java client code? Can anyone help me.

Thanks,

Siddhartha



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

Re: Using DateTime object

Posted by Siddhartha Mehta <si...@yahoo.com>.
Yes, I do know that this list just for the APACHE SOAP. I have posted questions on several sites including the Sun's but didn't get a reply, so just thought of asking here. I have pasted below the wsdl code.- <s:element name="UploadStart">- <s:complexType>- <s:sequence>  <s:element minOccurs="0" maxOccurs="1" name="SessionKey" type="s:string" />   <s:element minOccurs="1" maxOccurs="1" name="FolderId" type="s:long" />   <s:element minOccurs="0" maxOccurs="1" name="FileName" type="s:string" />   <s:element minOccurs="1" maxOccurs="1" name="bUseCompression" type="s:byte" />   <s:element minOccurs="1" maxOccurs="1" name="UncompressedSize" type="s:long" />   <s:element minOccurs="1" maxOccurs="1" name="Created" type="s:dateTime" />   <s:element minOccurs="1" maxOccurs="1" name="Modified" type="s:dateTime" />   <s:element minOccurs="1" maxOccurs="1" name="Accessed" type="s:dateTime" />   <s:element minOccurs="0" maxOccurs="1" name="StreamToken" type="s:string" />   </s:sequence>  </s:complexType>  </s:element>- <s:element name="UploadStartResponse">- <s:complexType>- <s:sequence>  <s:element minOccurs="1" maxOccurs="1" name="UploadStartResult" type="s:boolean" />   <s:element minOccurs="0" maxOccurs="1" name="StreamToken" type="s:string" />   </s:sequence>  </s:complexType>  </s:element> Thanks!!
 Scott Nichol <sn...@scottnichol.com> wrote:OK, a few things.

1. This list is just for Apache SOAP.

2. You still have not given the WSDL. It's what you'll get back if you
point your browser to your service with a query string of ?wsdl, e.g. a
URL like http://storagepoint.net/soap/service.asmx?wsdl.

3. If Microsoft maps a .NET DateTime to xsd:dateTime, I would try a Java
java.util.Date, which I would guess JAXP would map to xsd:dateTime. In
any case, since the parameters are using literal style, you should not
be specifying any xsi:type attribute: just get rid of that code.

Scott Nichol

----- Original Message -----
From: "Siddhartha Mehta" 
To: 
Sent: Tuesday, December 17, 2002 8:07 PM
Subject: Re: Using DateTime object


>
> Oh.. I pasted the wrong code. Here is my function in C# I am trying to
access:
>
> [WebMethod(Description = "Start uploading a file.")]
>
> public bool UploadStart(string SessionKey,
>
> long FolderId,
>
> string FileName,
>
> sbyte bUseCompression,
>
> long UncompressedSize,
>
> System.DateTime Created,
>
> System.DateTime Modified,
>
> System.DateTime Accessed,
>
> ref string StreamToken)
>
>
> Next, I am not using APACHE. I am using JAXP (sun's Java XML Pack).
The code that generates the request is:
>
> SOAPMessage message = GetSOAPMessage();
> MimeHeaders headers = GetMimeHeaders(message);
> SOAPPart soapPart = GetSOAPPart(message);
> SOAPEnvelope soapEnvelope = GetSOAPEnvelope(soapPart);
> SOAPBody soapBody = GetSOAPBody(soapEnvelope);
>
> headers.setHeader(Definition.SOAP_ACTION,
Definition.URL_UPLOAD_START);
> Name bodyName =
soapEnvelope.createName(Definition.FUNCTION_UPLOAD_START, "",
"http://storagepoint.net/soap/");
> SOAPElement soapElement = soapBody.addBodyElement(bodyName);
>
soapElement.addChildElement(soapEnvelope.createName(Definition.SESSION_K
EY)).addTextNode(sessionKey);
>
soapElement.addChildElement(soapEnvelope.createName(Definition.FOLDER_ID
)).addTextNode(strFolderId);
>
soapElement.addChildElement(soapEnvelope.createName(Definition.FILE_NAME
)).addTextNode(fileName_);
>
soapElement.addChildElement(soapEnvelope.createName(Definition.USE_COMPR
ESSION)).addTextNode("0");
>
soapElement.addChildElement(soapEnvelope.createName(Definition.SIZE)).ad
dTextNode(strSize);
>
> SOAPElement soapElementCreated =
soapElement.addChildElement(Definition.CREATED);
> soapElement.addNamespaceDeclaration("A",
"http://www.w3.org/2001/XMLSchema-instance");
> Name xsiType = soapEnvelope.createName("type", "A",
"http://www.w3.org/2001/XMLSchema-instance");
> soapElementCreated.addAttribute(xsiType, "DateTime");
> soapElementCreated.addTextNode(strDate);
>
> SOAPElement soapElementModified =
soapElement.addChildElement(Definition.MODIFIED);
> soapElement.addNamespaceDeclaration("B",
"http://www.w3.org/2001/XMLSchema-instance");
> Name xsiType1 = soapEnvelope.createName("type1", "B",
"http://www.w3.org/2001/XMLSchema-instance");
> soapElementModified.addAttribute(xsiType1, "DateTime");
> soapElementModified.addTextNode(strDate);
>
> SOAPElement soapElementAccessed =
soapElement.addChildElement(Definition.ACCESSED);
> soapElement.addNamespaceDeclaration("C",
"http://www.w3.org/2001/XMLSchema-instance");
> Name xsiType2 = soapEnvelope.createName("type2", "C",
"http://www.w3.org/2001/XMLSchema-instance");
> soapElementAccessed.addAttribute(xsiType2, "DateTime");
> soapElementAccessed.addTextNode(strDate);
>
> Scott Nichol wrote:Actually, the code
you included looks more like a client proxy than a
> service. Also, what code generates the request that you show? I don't
> see how Apache SOAP would generate that message.
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Scott Nichol"
> To:
> Sent: Tuesday, December 17, 2002 7:59 PM
> Subject: Re: Using DateTime object
>
>
> > Honestly, the WSDL is what I would need. I don't have time to create
> a
> > .NET service based on your code and look at the WSDL myself.
> >
> > Scott Nichol
> >
> > ----- Original Message -----
> > From: "Siddhartha Mehta"
> > To:
> > Sent: Tuesday, December 17, 2002 7:43 PM
> > Subject: Re: Using DateTime object
> >
> >
> > >
> > > Here is my C# webservice:
> > >
> > >
> >
>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://stora
> > gepoint.net/soap/UploadStart",
> > RequestNamespace="http://storagepoint.net/soap/",
> > ResponseNamespace="http://storagepoint.net/soap/",
> > Use=System.Web.Services.Description.SoapBindingUse.Literal,
> >
>
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)
> > ]
> > >
> > > public bool UploadStart(string SessionKey, long FolderId, string
> > FileName, System.SByte bUseCompression, long UncompressedSize,
> > System.DateTime Created, System.DateTime Modified, System.DateTime
> > Accessed, ref string StreamToken) {
> > >
> > > object[] results = this.Invoke("UploadStart", new object[] {
> > >
> > > SessionKey,
> > >
> > > FolderId,
> > >
> > > FileName,
> > >
> > > bUseCompression,
> > >
> > > UncompressedSize,
> > >
> > > Created,
> > >
> > > Modified,
> > >
> > > Accessed,
> > >
> > > StreamToken});
> > >
> > > StreamToken = ((string)(results[1]));
> > >
> > > return ((bool)(results[0]));
> > >
> > > }
> > >
> > >
> > > And the SOAP message that is sent is:
> > >
> > >
> > >
> > > >
> xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">> der/>
> > >
> > > > xmlns:A="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:B="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:C="http://www.w3.org/2001/XMLSchema-instance">
> > >
> > > 5617F6B2-AEAB-45CF-80C2-ED0379109DD9
> > >
> > > 8
> > >
> > > run.cmd
> > >
> > > 0
> > >
> > > 695
> > >
> > > 12/17/2002 4:39:40 PM
> > >
> > > 12/17/2002 4:39:40 PM
> > >
> > > 12/17/2002 4:39:40 PM
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > And the error I get is:
> > >
> > >
> > > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> > >
> > >
> > > soap:Client
> > > Server was unable to read request. --> There
> is
> > an error i
> > > n XML document (2, 565). --> String was not recognized as a valid
> > DateTime.> > faultstring>
> > >
> > >
> > >
> > >
> > >
> > > The strange thing here is, the error message says that the error
is
> at
> > column 565 which is surprisingly time. Does this mean that
> > the time is in correct format?
> > >
> > > Thanks!!
> > >
> > > Scott Nichol wrote:Can you post the
> > WSDL for the C# web service?
> > >
> > > Scott Nichol
> > >
> > > ----- Original Message -----
> > > From: "Siddhartha Mehta"
> > > To:
> > > Sent: Tuesday, December 17, 2002 6:55 PM
> > > Subject: Using DateTime object
> > >
> > >
> > > >
> > > > I am using C# webservice and a Java client. One of the functions
> in
> > my
> > > webservice expects a DateTime (C# object). How would I send a
> datetime
> > > object from my Java client code? Can anyone help me.
> > > >
> > > > Thanks,
> > > >
> > > > Siddhartha
> > > >
> > > >
> > > >
> > > > ---------------------------------
> > > > Do you Yahoo!?
> > > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > For additional commands, e-mail:
> > >
> > >
> > >
> > > ---------------------------------
> > > Do you Yahoo!?
> > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> >
> >
> > --
> > To unsubscribe, e-mail:
>
> > For additional commands, e-mail:
>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

Re: Using DateTime object

Posted by Scott Nichol <sn...@scottnichol.com>.
I'm glad to hear you are over this hump and ready for the next one ;-)

There is quite a lot to get your arms around with SOAP.  However, there
are a few things you can keep in mind.  One is that the data that each
SOAP message obeys rules defined in just a few specifications, namely
SOAP, WSDL, XML and XML Schema.  These specs are independent of
platforms, programming languages, etc.  Another thing to remember is
that much of each SOAP implementation (e.g. .NET, Apache SOAP) is code
to map SOAP messages to some platform or programming language model,
such as mapping XML Schema or WSDL types to and from classes, and
mapping SOAP messages to method calls.

Scott Nichol

----- Original Message -----
From: "Siddhartha Mehta" <si...@yahoo.com>
To: <so...@xml.apache.org>
Sent: Tuesday, December 17, 2002 10:44 PM
Subject: Re: Using DateTime object


>
> The reason I thought I was using a correct pattern was because I
checked the format of DateTime object in C# and build the same using
SimpleDateFormat in Java. Well, that wasn't the right way of doing. I
used according to the specifications in the link you provided and YES
its working. I am as good as a new comer to SOAP and XML world and
honestly, I didn't knew that the format had to be according to the one
at w3.org. This is something I have learnt from this conversation with
you and will be in my head always I work on SOAP and XML. And when I
looked at dateTime, I assumed it the same as DateTime in C# (the only
difference being lower case d).
> THANKS A LOTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT! for your help.
>  Scott Nichol <sn...@scottnichol.com> wrote:What makes you think
the pattern is exactly what C# is expecting? The
> WSDL snippet you posted shows the data type is supposed to be
> xsd:dateTime. The format you show is "12/17/2002 4:39:40 PM", which is
> not a valid xsd:dateTime. See
> http://www.w3.org/TR/xmlschema-2/#dateTime for documentation of the
XML
> Schema dateTime type.
>
> Someplace within JAXP is the ability to serialize a Java Date into
XSD's
> dateTime format, I'm sure.
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Siddhartha Mehta"
> To:
> Sent: Tuesday, December 17, 2002 8:38 PM
> Subject: Re: Using DateTime object
>
>
> >
> > I'd also like to add that I am using Java's Date object. In fact I
am
> using SimpleDateFormat with the pattern exactly similar to what C# is
> expecting. Also the error message indicates the error for Modified
time
> and that is after Created time. So just wondering if it accepts the
> Created time format.
> > Thanks!
> > Scott Nichol wrote:OK, a few things.
> >
> > 1. This list is just for Apache SOAP.
> >
> > 2. You still have not given the WSDL. It's what you'll get back if
you
> > point your browser to your service with a query string of ?wsdl,
e.g.
> a
> > URL like http://storagepoint.net/soap/service.asmx?wsdl.
> >
> > 3. If Microsoft maps a .NET DateTime to xsd:dateTime, I would try a
> Java
> > java.util.Date, which I would guess JAXP would map to xsd:dateTime.
In
> > any case, since the parameters are using literal style, you should
not
> > be specifying any xsi:type attribute: just get rid of that code.
> >
> > Scott Nichol
> >
> > ----- Original Message -----
> > From: "Siddhartha Mehta"
> > To:
> > Sent: Tuesday, December 17, 2002 8:07 PM
> > Subject: Re: Using DateTime object
> >
> >
> > >
> > > Oh.. I pasted the wrong code. Here is my function in C# I am
trying
> to
> > access:
> > >
> > > [WebMethod(Description = "Start uploading a file.")]
> > >
> > > public bool UploadStart(string SessionKey,
> > >
> > > long FolderId,
> > >
> > > string FileName,
> > >
> > > sbyte bUseCompression,
> > >
> > > long UncompressedSize,
> > >
> > > System.DateTime Created,
> > >
> > > System.DateTime Modified,
> > >
> > > System.DateTime Accessed,
> > >
> > > ref string StreamToken)
> > >
> > >
> > > Next, I am not using APACHE. I am using JAXP (sun's Java XML
Pack).
> > The code that generates the request is:
> > >
> > > SOAPMessage message = GetSOAPMessage();
> > > MimeHeaders headers = GetMimeHeaders(message);
> > > SOAPPart soapPart = GetSOAPPart(message);
> > > SOAPEnvelope soapEnvelope = GetSOAPEnvelope(soapPart);
> > > SOAPBody soapBody = GetSOAPBody(soapEnvelope);
> > >
> > > headers.setHeader(Definition.SOAP_ACTION,
> > Definition.URL_UPLOAD_START);
> > > Name bodyName =
> > soapEnvelope.createName(Definition.FUNCTION_UPLOAD_START, "",
> > "http://storagepoint.net/soap/");
> > > SOAPElement soapElement = soapBody.addBodyElement(bodyName);
> > >
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.SESSION_K
> > EY)).addTextNode(sessionKey);
> > >
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.FOLDER_ID
> > )).addTextNode(strFolderId);
> > >
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.FILE_NAME
> > )).addTextNode(fileName_);
> > >
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.USE_COMPR
> > ESSION)).addTextNode("0");
> > >
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.SIZE)).ad
> > dTextNode(strSize);
> > >
> > > SOAPElement soapElementCreated =
> > soapElement.addChildElement(Definition.CREATED);
> > > soapElement.addNamespaceDeclaration("A",
> > "http://www.w3.org/2001/XMLSchema-instance");
> > > Name xsiType = soapEnvelope.createName("type", "A",
> > "http://www.w3.org/2001/XMLSchema-instance");
> > > soapElementCreated.addAttribute(xsiType, "DateTime");
> > > soapElementCreated.addTextNode(strDate);
> > >
> > > SOAPElement soapElementModified =
> > soapElement.addChildElement(Definition.MODIFIED);
> > > soapElement.addNamespaceDeclaration("B",
> > "http://www.w3.org/2001/XMLSchema-instance");
> > > Name xsiType1 = soapEnvelope.createName("type1", "B",
> > "http://www.w3.org/2001/XMLSchema-instance");
> > > soapElementModified.addAttribute(xsiType1, "DateTime");
> > > soapElementModified.addTextNode(strDate);
> > >
> > > SOAPElement soapElementAccessed =
> > soapElement.addChildElement(Definition.ACCESSED);
> > > soapElement.addNamespaceDeclaration("C",
> > "http://www.w3.org/2001/XMLSchema-instance");
> > > Name xsiType2 = soapEnvelope.createName("type2", "C",
> > "http://www.w3.org/2001/XMLSchema-instance");
> > > soapElementAccessed.addAttribute(xsiType2, "DateTime");
> > > soapElementAccessed.addTextNode(strDate);
> > >
> > > Scott Nichol wrote:Actually, the code
> > you included looks more like a client proxy than a
> > > service. Also, what code generates the request that you show? I
> don't
> > > see how Apache SOAP would generate that message.
> > >
> > > Scott Nichol
> > >
> > > ----- Original Message -----
> > > From: "Scott Nichol"
> > > To:
> > > Sent: Tuesday, December 17, 2002 7:59 PM
> > > Subject: Re: Using DateTime object
> > >
> > >
> > > > Honestly, the WSDL is what I would need. I don't have time to
> create
> > > a
> > > > .NET service based on your code and look at the WSDL myself.
> > > >
> > > > Scott Nichol
> > > >
> > > > ----- Original Message -----
> > > > From: "Siddhartha Mehta"
> > > > To:
> > > > Sent: Tuesday, December 17, 2002 7:43 PM
> > > > Subject: Re: Using DateTime object
> > > >
> > > >
> > > > >
> > > > > Here is my C# webservice:
> > > > >
> > > > >
> > > >
> > >
> >
>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://stora
> > > > gepoint.net/soap/UploadStart",
> > > > RequestNamespace="http://storagepoint.net/soap/",
> > > > ResponseNamespace="http://storagepoint.net/soap/",
> > > > Use=System.Web.Services.Description.SoapBindingUse.Literal,
> > > >
> > >
> >
>
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)
> > > > ]
> > > > >
> > > > > public bool UploadStart(string SessionKey, long FolderId,
string
> > > > FileName, System.SByte bUseCompression, long UncompressedSize,
> > > > System.DateTime Created, System.DateTime Modified,
System.DateTime
> > > > Accessed, ref string StreamToken) {
> > > > >
> > > > > object[] results = this.Invoke("UploadStart", new object[] {
> > > > >
> > > > > SessionKey,
> > > > >
> > > > > FolderId,
> > > > >
> > > > > FileName,
> > > > >
> > > > > bUseCompression,
> > > > >
> > > > > UncompressedSize,
> > > > >
> > > > > Created,
> > > > >
> > > > > Modified,
> > > > >
> > > > > Accessed,
> > > > >
> > > > > StreamToken});
> > > > >
> > > > > StreamToken = ((string)(results[1]));
> > > > >
> > > > > return ((bool)(results[0]));
> > > > >
> > > > > }
> > > > >
> > > > >
> > > > > And the SOAP message that is sent is:
> > > > >
> > > > >
> > > > >
> > > > > >
> > > xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">> der/>
> > > > >
> > > > > > xmlns:A="http://www.w3.org/2001/XMLSchema-instance"
> > > > xmlns:B="http://www.w3.org/2001/XMLSchema-instance"
> > > > xmlns:C="http://www.w3.org/2001/XMLSchema-instance">
> > > > >
> > > > > 5617F6B2-AEAB-45CF-80C2-ED0379109DD9
> > > > >
> > > > > 8
> > > > >
> > > > > run.cmd
> > > > >
> > > > > 0
> > > > >
> > > > > 695
> > > > >
> > > > > 12/17/2002 4:39:40 PM
> > > > >
> > > > > 12/17/2002 4:39:40 PM
> > > > >
> > > > > 12/17/2002 4:39:40 PM
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > And the error I get is:
> > > > >
> > > > >
> > > > > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> > > > >
> > > > >
> > > > > soap:Client
> > > > > Server was unable to read request. --> There
> > > is
> > > > an error i
> > > > > n XML document (2, 565). --> String was not recognized as a
> valid
> > > > DateTime.> > faultstring>
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > The strange thing here is, the error message says that the
error
> > is
> > > at
> > > > column 565 which is surprisingly time. Does this mean that
> > > > the time is in correct format?
> > > > >
> > > > > Thanks!!
> > > > >
> > > > > Scott Nichol wrote:Can you post the
> > > > WSDL for the C# web service?
> > > > >
> > > > > Scott Nichol
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "Siddhartha Mehta"
> > > > > To:
> > > > > Sent: Tuesday, December 17, 2002 6:55 PM
> > > > > Subject: Using DateTime object
> > > > >
> > > > >
> > > > > >
> > > > > > I am using C# webservice and a Java client. One of the
> functions
> > > in
> > > > my
> > > > > webservice expects a DateTime (C# object). How would I send a
> > > datetime
> > > > > object from my Java client code? Can anyone help me.
> > > > > >
> > > > > > Thanks,
> > > > > >
> > > > > > Siddhartha
> > > > > >
> > > > > >
> > > > > >
> > > > > > ---------------------------------
> > > > > > Do you Yahoo!?
> > > > > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> > > > >
> > > > >
> > > > > --
> > > > > To unsubscribe, e-mail:
> > > > > For additional commands, e-mail:
> > > > >
> > > > >
> > > > >
> > > > > ---------------------------------
> > > > > Do you Yahoo!?
> > > > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > >
> > > > For additional commands, e-mail:
> > >
> > > >
> > > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > For additional commands, e-mail:
> > >
> > >
> > >
> > > ---------------------------------
> > > Do you Yahoo!?
> > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> >
> >
> > --
> > To unsubscribe, e-mail:
> > For additional commands, e-mail:
> >
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
>
>
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now


Re: Using DateTime object

Posted by Scott Nichol <sn...@scottnichol.com>.
I'm glad to hear you are over this hump and ready for the next one ;-)

There is quite a lot to get your arms around with SOAP.  However, there
are a few things you can keep in mind.  One is that the data that each
SOAP message obeys rules defined in just a few specifications, namely
SOAP, WSDL, XML and XML Schema.  These specs are independent of
platforms, programming languages, etc.  Another thing to remember is
that much of each SOAP implementation (e.g. .NET, Apache SOAP) is code
to map SOAP messages to some platform or programming language model,
such as mapping XML Schema or WSDL types to and from classes, and
mapping SOAP messages to method calls.

Scott Nichol

----- Original Message -----
From: "Siddhartha Mehta" <si...@yahoo.com>
To: <so...@xml.apache.org>
Sent: Tuesday, December 17, 2002 10:44 PM
Subject: Re: Using DateTime object


>
> The reason I thought I was using a correct pattern was because I
checked the format of DateTime object in C# and build the same using
SimpleDateFormat in Java. Well, that wasn't the right way of doing. I
used according to the specifications in the link you provided and YES
its working. I am as good as a new comer to SOAP and XML world and
honestly, I didn't knew that the format had to be according to the one
at w3.org. This is something I have learnt from this conversation with
you and will be in my head always I work on SOAP and XML. And when I
looked at dateTime, I assumed it the same as DateTime in C# (the only
difference being lower case d).
> THANKS A LOTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT! for your help.
>  Scott Nichol <sn...@scottnichol.com> wrote:What makes you think
the pattern is exactly what C# is expecting? The
> WSDL snippet you posted shows the data type is supposed to be
> xsd:dateTime. The format you show is "12/17/2002 4:39:40 PM", which is
> not a valid xsd:dateTime. See
> http://www.w3.org/TR/xmlschema-2/#dateTime for documentation of the
XML
> Schema dateTime type.
>
> Someplace within JAXP is the ability to serialize a Java Date into
XSD's
> dateTime format, I'm sure.
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Siddhartha Mehta"
> To:
> Sent: Tuesday, December 17, 2002 8:38 PM
> Subject: Re: Using DateTime object
>
>
> >
> > I'd also like to add that I am using Java's Date object. In fact I
am
> using SimpleDateFormat with the pattern exactly similar to what C# is
> expecting. Also the error message indicates the error for Modified
time
> and that is after Created time. So just wondering if it accepts the
> Created time format.
> > Thanks!
> > Scott Nichol wrote:OK, a few things.
> >
> > 1. This list is just for Apache SOAP.
> >
> > 2. You still have not given the WSDL. It's what you'll get back if
you
> > point your browser to your service with a query string of ?wsdl,
e.g.
> a
> > URL like http://storagepoint.net/soap/service.asmx?wsdl.
> >
> > 3. If Microsoft maps a .NET DateTime to xsd:dateTime, I would try a
> Java
> > java.util.Date, which I would guess JAXP would map to xsd:dateTime.
In
> > any case, since the parameters are using literal style, you should
not
> > be specifying any xsi:type attribute: just get rid of that code.
> >
> > Scott Nichol
> >
> > ----- Original Message -----
> > From: "Siddhartha Mehta"
> > To:
> > Sent: Tuesday, December 17, 2002 8:07 PM
> > Subject: Re: Using DateTime object
> >
> >
> > >
> > > Oh.. I pasted the wrong code. Here is my function in C# I am
trying
> to
> > access:
> > >
> > > [WebMethod(Description = "Start uploading a file.")]
> > >
> > > public bool UploadStart(string SessionKey,
> > >
> > > long FolderId,
> > >
> > > string FileName,
> > >
> > > sbyte bUseCompression,
> > >
> > > long UncompressedSize,
> > >
> > > System.DateTime Created,
> > >
> > > System.DateTime Modified,
> > >
> > > System.DateTime Accessed,
> > >
> > > ref string StreamToken)
> > >
> > >
> > > Next, I am not using APACHE. I am using JAXP (sun's Java XML
Pack).
> > The code that generates the request is:
> > >
> > > SOAPMessage message = GetSOAPMessage();
> > > MimeHeaders headers = GetMimeHeaders(message);
> > > SOAPPart soapPart = GetSOAPPart(message);
> > > SOAPEnvelope soapEnvelope = GetSOAPEnvelope(soapPart);
> > > SOAPBody soapBody = GetSOAPBody(soapEnvelope);
> > >
> > > headers.setHeader(Definition.SOAP_ACTION,
> > Definition.URL_UPLOAD_START);
> > > Name bodyName =
> > soapEnvelope.createName(Definition.FUNCTION_UPLOAD_START, "",
> > "http://storagepoint.net/soap/");
> > > SOAPElement soapElement = soapBody.addBodyElement(bodyName);
> > >
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.SESSION_K
> > EY)).addTextNode(sessionKey);
> > >
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.FOLDER_ID
> > )).addTextNode(strFolderId);
> > >
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.FILE_NAME
> > )).addTextNode(fileName_);
> > >
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.USE_COMPR
> > ESSION)).addTextNode("0");
> > >
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.SIZE)).ad
> > dTextNode(strSize);
> > >
> > > SOAPElement soapElementCreated =
> > soapElement.addChildElement(Definition.CREATED);
> > > soapElement.addNamespaceDeclaration("A",
> > "http://www.w3.org/2001/XMLSchema-instance");
> > > Name xsiType = soapEnvelope.createName("type", "A",
> > "http://www.w3.org/2001/XMLSchema-instance");
> > > soapElementCreated.addAttribute(xsiType, "DateTime");
> > > soapElementCreated.addTextNode(strDate);
> > >
> > > SOAPElement soapElementModified =
> > soapElement.addChildElement(Definition.MODIFIED);
> > > soapElement.addNamespaceDeclaration("B",
> > "http://www.w3.org/2001/XMLSchema-instance");
> > > Name xsiType1 = soapEnvelope.createName("type1", "B",
> > "http://www.w3.org/2001/XMLSchema-instance");
> > > soapElementModified.addAttribute(xsiType1, "DateTime");
> > > soapElementModified.addTextNode(strDate);
> > >
> > > SOAPElement soapElementAccessed =
> > soapElement.addChildElement(Definition.ACCESSED);
> > > soapElement.addNamespaceDeclaration("C",
> > "http://www.w3.org/2001/XMLSchema-instance");
> > > Name xsiType2 = soapEnvelope.createName("type2", "C",
> > "http://www.w3.org/2001/XMLSchema-instance");
> > > soapElementAccessed.addAttribute(xsiType2, "DateTime");
> > > soapElementAccessed.addTextNode(strDate);
> > >
> > > Scott Nichol wrote:Actually, the code
> > you included looks more like a client proxy than a
> > > service. Also, what code generates the request that you show? I
> don't
> > > see how Apache SOAP would generate that message.
> > >
> > > Scott Nichol
> > >
> > > ----- Original Message -----
> > > From: "Scott Nichol"
> > > To:
> > > Sent: Tuesday, December 17, 2002 7:59 PM
> > > Subject: Re: Using DateTime object
> > >
> > >
> > > > Honestly, the WSDL is what I would need. I don't have time to
> create
> > > a
> > > > .NET service based on your code and look at the WSDL myself.
> > > >
> > > > Scott Nichol
> > > >
> > > > ----- Original Message -----
> > > > From: "Siddhartha Mehta"
> > > > To:
> > > > Sent: Tuesday, December 17, 2002 7:43 PM
> > > > Subject: Re: Using DateTime object
> > > >
> > > >
> > > > >
> > > > > Here is my C# webservice:
> > > > >
> > > > >
> > > >
> > >
> >
>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://stora
> > > > gepoint.net/soap/UploadStart",
> > > > RequestNamespace="http://storagepoint.net/soap/",
> > > > ResponseNamespace="http://storagepoint.net/soap/",
> > > > Use=System.Web.Services.Description.SoapBindingUse.Literal,
> > > >
> > >
> >
>
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)
> > > > ]
> > > > >
> > > > > public bool UploadStart(string SessionKey, long FolderId,
string
> > > > FileName, System.SByte bUseCompression, long UncompressedSize,
> > > > System.DateTime Created, System.DateTime Modified,
System.DateTime
> > > > Accessed, ref string StreamToken) {
> > > > >
> > > > > object[] results = this.Invoke("UploadStart", new object[] {
> > > > >
> > > > > SessionKey,
> > > > >
> > > > > FolderId,
> > > > >
> > > > > FileName,
> > > > >
> > > > > bUseCompression,
> > > > >
> > > > > UncompressedSize,
> > > > >
> > > > > Created,
> > > > >
> > > > > Modified,
> > > > >
> > > > > Accessed,
> > > > >
> > > > > StreamToken});
> > > > >
> > > > > StreamToken = ((string)(results[1]));
> > > > >
> > > > > return ((bool)(results[0]));
> > > > >
> > > > > }
> > > > >
> > > > >
> > > > > And the SOAP message that is sent is:
> > > > >
> > > > >
> > > > >
> > > > > >
> > > xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">> der/>
> > > > >
> > > > > > xmlns:A="http://www.w3.org/2001/XMLSchema-instance"
> > > > xmlns:B="http://www.w3.org/2001/XMLSchema-instance"
> > > > xmlns:C="http://www.w3.org/2001/XMLSchema-instance">
> > > > >
> > > > > 5617F6B2-AEAB-45CF-80C2-ED0379109DD9
> > > > >
> > > > > 8
> > > > >
> > > > > run.cmd
> > > > >
> > > > > 0
> > > > >
> > > > > 695
> > > > >
> > > > > 12/17/2002 4:39:40 PM
> > > > >
> > > > > 12/17/2002 4:39:40 PM
> > > > >
> > > > > 12/17/2002 4:39:40 PM
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > And the error I get is:
> > > > >
> > > > >
> > > > > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> > > > >
> > > > >
> > > > > soap:Client
> > > > > Server was unable to read request. --> There
> > > is
> > > > an error i
> > > > > n XML document (2, 565). --> String was not recognized as a
> valid
> > > > DateTime.> > faultstring>
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > The strange thing here is, the error message says that the
error
> > is
> > > at
> > > > column 565 which is surprisingly time. Does this mean that
> > > > the time is in correct format?
> > > > >
> > > > > Thanks!!
> > > > >
> > > > > Scott Nichol wrote:Can you post the
> > > > WSDL for the C# web service?
> > > > >
> > > > > Scott Nichol
> > > > >
> > > > > ----- Original Message -----
> > > > > From: "Siddhartha Mehta"
> > > > > To:
> > > > > Sent: Tuesday, December 17, 2002 6:55 PM
> > > > > Subject: Using DateTime object
> > > > >
> > > > >
> > > > > >
> > > > > > I am using C# webservice and a Java client. One of the
> functions
> > > in
> > > > my
> > > > > webservice expects a DateTime (C# object). How would I send a
> > > datetime
> > > > > object from my Java client code? Can anyone help me.
> > > > > >
> > > > > > Thanks,
> > > > > >
> > > > > > Siddhartha
> > > > > >
> > > > > >
> > > > > >
> > > > > > ---------------------------------
> > > > > > Do you Yahoo!?
> > > > > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> > > > >
> > > > >
> > > > > --
> > > > > To unsubscribe, e-mail:
> > > > > For additional commands, e-mail:
> > > > >
> > > > >
> > > > >
> > > > > ---------------------------------
> > > > > Do you Yahoo!?
> > > > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > >
> > > > For additional commands, e-mail:
> > >
> > > >
> > > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > For additional commands, e-mail:
> > >
> > >
> > >
> > > ---------------------------------
> > > Do you Yahoo!?
> > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> >
> >
> > --
> > To unsubscribe, e-mail:
> > For additional commands, e-mail:
> >
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
>
>
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now


Re: Using DateTime object

Posted by Siddhartha Mehta <si...@yahoo.com>.
The reason I thought I was using a correct pattern was because I checked the format of DateTime object in C# and build the same using SimpleDateFormat in Java. Well, that wasn't the right way of doing. I used according to the specifications in the link you provided and YES its working. I am as good as a new comer to SOAP and XML world and honestly, I didn't knew that the format had to be according to the one at w3.org. This is something I have learnt from this conversation with you and will be in my head always I work on SOAP and XML. And when I looked at dateTime, I assumed it the same as DateTime in C# (the only difference being lower case d).
THANKS A LOTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT! for your help.
 Scott Nichol <sn...@scottnichol.com> wrote:What makes you think the pattern is exactly what C# is expecting? The
WSDL snippet you posted shows the data type is supposed to be
xsd:dateTime. The format you show is "12/17/2002 4:39:40 PM", which is
not a valid xsd:dateTime. See
http://www.w3.org/TR/xmlschema-2/#dateTime for documentation of the XML
Schema dateTime type.

Someplace within JAXP is the ability to serialize a Java Date into XSD's
dateTime format, I'm sure.

Scott Nichol

----- Original Message -----
From: "Siddhartha Mehta" 
To: 
Sent: Tuesday, December 17, 2002 8:38 PM
Subject: Re: Using DateTime object


>
> I'd also like to add that I am using Java's Date object. In fact I am
using SimpleDateFormat with the pattern exactly similar to what C# is
expecting. Also the error message indicates the error for Modified time
and that is after Created time. So just wondering if it accepts the
Created time format.
> Thanks!
> Scott Nichol wrote:OK, a few things.
>
> 1. This list is just for Apache SOAP.
>
> 2. You still have not given the WSDL. It's what you'll get back if you
> point your browser to your service with a query string of ?wsdl, e.g.
a
> URL like http://storagepoint.net/soap/service.asmx?wsdl.
>
> 3. If Microsoft maps a .NET DateTime to xsd:dateTime, I would try a
Java
> java.util.Date, which I would guess JAXP would map to xsd:dateTime. In
> any case, since the parameters are using literal style, you should not
> be specifying any xsi:type attribute: just get rid of that code.
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Siddhartha Mehta"
> To:
> Sent: Tuesday, December 17, 2002 8:07 PM
> Subject: Re: Using DateTime object
>
>
> >
> > Oh.. I pasted the wrong code. Here is my function in C# I am trying
to
> access:
> >
> > [WebMethod(Description = "Start uploading a file.")]
> >
> > public bool UploadStart(string SessionKey,
> >
> > long FolderId,
> >
> > string FileName,
> >
> > sbyte bUseCompression,
> >
> > long UncompressedSize,
> >
> > System.DateTime Created,
> >
> > System.DateTime Modified,
> >
> > System.DateTime Accessed,
> >
> > ref string StreamToken)
> >
> >
> > Next, I am not using APACHE. I am using JAXP (sun's Java XML Pack).
> The code that generates the request is:
> >
> > SOAPMessage message = GetSOAPMessage();
> > MimeHeaders headers = GetMimeHeaders(message);
> > SOAPPart soapPart = GetSOAPPart(message);
> > SOAPEnvelope soapEnvelope = GetSOAPEnvelope(soapPart);
> > SOAPBody soapBody = GetSOAPBody(soapEnvelope);
> >
> > headers.setHeader(Definition.SOAP_ACTION,
> Definition.URL_UPLOAD_START);
> > Name bodyName =
> soapEnvelope.createName(Definition.FUNCTION_UPLOAD_START, "",
> "http://storagepoint.net/soap/");
> > SOAPElement soapElement = soapBody.addBodyElement(bodyName);
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.SESSION_K
> EY)).addTextNode(sessionKey);
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.FOLDER_ID
> )).addTextNode(strFolderId);
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.FILE_NAME
> )).addTextNode(fileName_);
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.USE_COMPR
> ESSION)).addTextNode("0");
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.SIZE)).ad
> dTextNode(strSize);
> >
> > SOAPElement soapElementCreated =
> soapElement.addChildElement(Definition.CREATED);
> > soapElement.addNamespaceDeclaration("A",
> "http://www.w3.org/2001/XMLSchema-instance");
> > Name xsiType = soapEnvelope.createName("type", "A",
> "http://www.w3.org/2001/XMLSchema-instance");
> > soapElementCreated.addAttribute(xsiType, "DateTime");
> > soapElementCreated.addTextNode(strDate);
> >
> > SOAPElement soapElementModified =
> soapElement.addChildElement(Definition.MODIFIED);
> > soapElement.addNamespaceDeclaration("B",
> "http://www.w3.org/2001/XMLSchema-instance");
> > Name xsiType1 = soapEnvelope.createName("type1", "B",
> "http://www.w3.org/2001/XMLSchema-instance");
> > soapElementModified.addAttribute(xsiType1, "DateTime");
> > soapElementModified.addTextNode(strDate);
> >
> > SOAPElement soapElementAccessed =
> soapElement.addChildElement(Definition.ACCESSED);
> > soapElement.addNamespaceDeclaration("C",
> "http://www.w3.org/2001/XMLSchema-instance");
> > Name xsiType2 = soapEnvelope.createName("type2", "C",
> "http://www.w3.org/2001/XMLSchema-instance");
> > soapElementAccessed.addAttribute(xsiType2, "DateTime");
> > soapElementAccessed.addTextNode(strDate);
> >
> > Scott Nichol wrote:Actually, the code
> you included looks more like a client proxy than a
> > service. Also, what code generates the request that you show? I
don't
> > see how Apache SOAP would generate that message.
> >
> > Scott Nichol
> >
> > ----- Original Message -----
> > From: "Scott Nichol"
> > To:
> > Sent: Tuesday, December 17, 2002 7:59 PM
> > Subject: Re: Using DateTime object
> >
> >
> > > Honestly, the WSDL is what I would need. I don't have time to
create
> > a
> > > .NET service based on your code and look at the WSDL myself.
> > >
> > > Scott Nichol
> > >
> > > ----- Original Message -----
> > > From: "Siddhartha Mehta"
> > > To:
> > > Sent: Tuesday, December 17, 2002 7:43 PM
> > > Subject: Re: Using DateTime object
> > >
> > >
> > > >
> > > > Here is my C# webservice:
> > > >
> > > >
> > >
> >
>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://stora
> > > gepoint.net/soap/UploadStart",
> > > RequestNamespace="http://storagepoint.net/soap/",
> > > ResponseNamespace="http://storagepoint.net/soap/",
> > > Use=System.Web.Services.Description.SoapBindingUse.Literal,
> > >
> >
>
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)
> > > ]
> > > >
> > > > public bool UploadStart(string SessionKey, long FolderId, string
> > > FileName, System.SByte bUseCompression, long UncompressedSize,
> > > System.DateTime Created, System.DateTime Modified, System.DateTime
> > > Accessed, ref string StreamToken) {
> > > >
> > > > object[] results = this.Invoke("UploadStart", new object[] {
> > > >
> > > > SessionKey,
> > > >
> > > > FolderId,
> > > >
> > > > FileName,
> > > >
> > > > bUseCompression,
> > > >
> > > > UncompressedSize,
> > > >
> > > > Created,
> > > >
> > > > Modified,
> > > >
> > > > Accessed,
> > > >
> > > > StreamToken});
> > > >
> > > > StreamToken = ((string)(results[1]));
> > > >
> > > > return ((bool)(results[0]));
> > > >
> > > > }
> > > >
> > > >
> > > > And the SOAP message that is sent is:
> > > >
> > > >
> > > >
> > > > >
> > xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">> der/>
> > > >
> > > > > xmlns:A="http://www.w3.org/2001/XMLSchema-instance"
> > > xmlns:B="http://www.w3.org/2001/XMLSchema-instance"
> > > xmlns:C="http://www.w3.org/2001/XMLSchema-instance">
> > > >
> > > > 5617F6B2-AEAB-45CF-80C2-ED0379109DD9
> > > >
> > > > 8
> > > >
> > > > run.cmd
> > > >
> > > > 0
> > > >
> > > > 695
> > > >
> > > > 12/17/2002 4:39:40 PM
> > > >
> > > > 12/17/2002 4:39:40 PM
> > > >
> > > > 12/17/2002 4:39:40 PM
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > And the error I get is:
> > > >
> > > >
> > > > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> > > >
> > > >
> > > > soap:Client
> > > > Server was unable to read request. --> There
> > is
> > > an error i
> > > > n XML document (2, 565). --> String was not recognized as a
valid
> > > DateTime.> > faultstring>
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > The strange thing here is, the error message says that the error
> is
> > at
> > > column 565 which is surprisingly time. Does this mean that
> > > the time is in correct format?
> > > >
> > > > Thanks!!
> > > >
> > > > Scott Nichol wrote:Can you post the
> > > WSDL for the C# web service?
> > > >
> > > > Scott Nichol
> > > >
> > > > ----- Original Message -----
> > > > From: "Siddhartha Mehta"
> > > > To:
> > > > Sent: Tuesday, December 17, 2002 6:55 PM
> > > > Subject: Using DateTime object
> > > >
> > > >
> > > > >
> > > > > I am using C# webservice and a Java client. One of the
functions
> > in
> > > my
> > > > webservice expects a DateTime (C# object). How would I send a
> > datetime
> > > > object from my Java client code? Can anyone help me.
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Siddhartha
> > > > >
> > > > >
> > > > >
> > > > > ---------------------------------
> > > > > Do you Yahoo!?
> > > > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > > For additional commands, e-mail:
> > > >
> > > >
> > > >
> > > > ---------------------------------
> > > > Do you Yahoo!?
> > > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> >
> > > For additional commands, e-mail:
> >
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > For additional commands, e-mail:
> >
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
>
>
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

Re: Using DateTime object

Posted by Siddhartha Mehta <si...@yahoo.com>.
The reason I thought I was using a correct pattern was because I checked the format of DateTime object in C# and build the same using SimpleDateFormat in Java. Well, that wasn't the right way of doing. I used according to the specifications in the link you provided and YES its working. I am as good as a new comer to SOAP and XML world and honestly, I didn't knew that the format had to be according to the one at w3.org. This is something I have learnt from this conversation with you and will be in my head always I work on SOAP and XML. And when I looked at dateTime, I assumed it the same as DateTime in C# (the only difference being lower case d).
THANKS A LOTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTTT! for your help.
 Scott Nichol <sn...@scottnichol.com> wrote:What makes you think the pattern is exactly what C# is expecting? The
WSDL snippet you posted shows the data type is supposed to be
xsd:dateTime. The format you show is "12/17/2002 4:39:40 PM", which is
not a valid xsd:dateTime. See
http://www.w3.org/TR/xmlschema-2/#dateTime for documentation of the XML
Schema dateTime type.

Someplace within JAXP is the ability to serialize a Java Date into XSD's
dateTime format, I'm sure.

Scott Nichol

----- Original Message -----
From: "Siddhartha Mehta" 
To: 
Sent: Tuesday, December 17, 2002 8:38 PM
Subject: Re: Using DateTime object


>
> I'd also like to add that I am using Java's Date object. In fact I am
using SimpleDateFormat with the pattern exactly similar to what C# is
expecting. Also the error message indicates the error for Modified time
and that is after Created time. So just wondering if it accepts the
Created time format.
> Thanks!
> Scott Nichol wrote:OK, a few things.
>
> 1. This list is just for Apache SOAP.
>
> 2. You still have not given the WSDL. It's what you'll get back if you
> point your browser to your service with a query string of ?wsdl, e.g.
a
> URL like http://storagepoint.net/soap/service.asmx?wsdl.
>
> 3. If Microsoft maps a .NET DateTime to xsd:dateTime, I would try a
Java
> java.util.Date, which I would guess JAXP would map to xsd:dateTime. In
> any case, since the parameters are using literal style, you should not
> be specifying any xsi:type attribute: just get rid of that code.
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Siddhartha Mehta"
> To:
> Sent: Tuesday, December 17, 2002 8:07 PM
> Subject: Re: Using DateTime object
>
>
> >
> > Oh.. I pasted the wrong code. Here is my function in C# I am trying
to
> access:
> >
> > [WebMethod(Description = "Start uploading a file.")]
> >
> > public bool UploadStart(string SessionKey,
> >
> > long FolderId,
> >
> > string FileName,
> >
> > sbyte bUseCompression,
> >
> > long UncompressedSize,
> >
> > System.DateTime Created,
> >
> > System.DateTime Modified,
> >
> > System.DateTime Accessed,
> >
> > ref string StreamToken)
> >
> >
> > Next, I am not using APACHE. I am using JAXP (sun's Java XML Pack).
> The code that generates the request is:
> >
> > SOAPMessage message = GetSOAPMessage();
> > MimeHeaders headers = GetMimeHeaders(message);
> > SOAPPart soapPart = GetSOAPPart(message);
> > SOAPEnvelope soapEnvelope = GetSOAPEnvelope(soapPart);
> > SOAPBody soapBody = GetSOAPBody(soapEnvelope);
> >
> > headers.setHeader(Definition.SOAP_ACTION,
> Definition.URL_UPLOAD_START);
> > Name bodyName =
> soapEnvelope.createName(Definition.FUNCTION_UPLOAD_START, "",
> "http://storagepoint.net/soap/");
> > SOAPElement soapElement = soapBody.addBodyElement(bodyName);
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.SESSION_K
> EY)).addTextNode(sessionKey);
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.FOLDER_ID
> )).addTextNode(strFolderId);
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.FILE_NAME
> )).addTextNode(fileName_);
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.USE_COMPR
> ESSION)).addTextNode("0");
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.SIZE)).ad
> dTextNode(strSize);
> >
> > SOAPElement soapElementCreated =
> soapElement.addChildElement(Definition.CREATED);
> > soapElement.addNamespaceDeclaration("A",
> "http://www.w3.org/2001/XMLSchema-instance");
> > Name xsiType = soapEnvelope.createName("type", "A",
> "http://www.w3.org/2001/XMLSchema-instance");
> > soapElementCreated.addAttribute(xsiType, "DateTime");
> > soapElementCreated.addTextNode(strDate);
> >
> > SOAPElement soapElementModified =
> soapElement.addChildElement(Definition.MODIFIED);
> > soapElement.addNamespaceDeclaration("B",
> "http://www.w3.org/2001/XMLSchema-instance");
> > Name xsiType1 = soapEnvelope.createName("type1", "B",
> "http://www.w3.org/2001/XMLSchema-instance");
> > soapElementModified.addAttribute(xsiType1, "DateTime");
> > soapElementModified.addTextNode(strDate);
> >
> > SOAPElement soapElementAccessed =
> soapElement.addChildElement(Definition.ACCESSED);
> > soapElement.addNamespaceDeclaration("C",
> "http://www.w3.org/2001/XMLSchema-instance");
> > Name xsiType2 = soapEnvelope.createName("type2", "C",
> "http://www.w3.org/2001/XMLSchema-instance");
> > soapElementAccessed.addAttribute(xsiType2, "DateTime");
> > soapElementAccessed.addTextNode(strDate);
> >
> > Scott Nichol wrote:Actually, the code
> you included looks more like a client proxy than a
> > service. Also, what code generates the request that you show? I
don't
> > see how Apache SOAP would generate that message.
> >
> > Scott Nichol
> >
> > ----- Original Message -----
> > From: "Scott Nichol"
> > To:
> > Sent: Tuesday, December 17, 2002 7:59 PM
> > Subject: Re: Using DateTime object
> >
> >
> > > Honestly, the WSDL is what I would need. I don't have time to
create
> > a
> > > .NET service based on your code and look at the WSDL myself.
> > >
> > > Scott Nichol
> > >
> > > ----- Original Message -----
> > > From: "Siddhartha Mehta"
> > > To:
> > > Sent: Tuesday, December 17, 2002 7:43 PM
> > > Subject: Re: Using DateTime object
> > >
> > >
> > > >
> > > > Here is my C# webservice:
> > > >
> > > >
> > >
> >
>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://stora
> > > gepoint.net/soap/UploadStart",
> > > RequestNamespace="http://storagepoint.net/soap/",
> > > ResponseNamespace="http://storagepoint.net/soap/",
> > > Use=System.Web.Services.Description.SoapBindingUse.Literal,
> > >
> >
>
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)
> > > ]
> > > >
> > > > public bool UploadStart(string SessionKey, long FolderId, string
> > > FileName, System.SByte bUseCompression, long UncompressedSize,
> > > System.DateTime Created, System.DateTime Modified, System.DateTime
> > > Accessed, ref string StreamToken) {
> > > >
> > > > object[] results = this.Invoke("UploadStart", new object[] {
> > > >
> > > > SessionKey,
> > > >
> > > > FolderId,
> > > >
> > > > FileName,
> > > >
> > > > bUseCompression,
> > > >
> > > > UncompressedSize,
> > > >
> > > > Created,
> > > >
> > > > Modified,
> > > >
> > > > Accessed,
> > > >
> > > > StreamToken});
> > > >
> > > > StreamToken = ((string)(results[1]));
> > > >
> > > > return ((bool)(results[0]));
> > > >
> > > > }
> > > >
> > > >
> > > > And the SOAP message that is sent is:
> > > >
> > > >
> > > >
> > > > >
> > xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">> der/>
> > > >
> > > > > xmlns:A="http://www.w3.org/2001/XMLSchema-instance"
> > > xmlns:B="http://www.w3.org/2001/XMLSchema-instance"
> > > xmlns:C="http://www.w3.org/2001/XMLSchema-instance">
> > > >
> > > > 5617F6B2-AEAB-45CF-80C2-ED0379109DD9
> > > >
> > > > 8
> > > >
> > > > run.cmd
> > > >
> > > > 0
> > > >
> > > > 695
> > > >
> > > > 12/17/2002 4:39:40 PM
> > > >
> > > > 12/17/2002 4:39:40 PM
> > > >
> > > > 12/17/2002 4:39:40 PM
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > And the error I get is:
> > > >
> > > >
> > > > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> > > >
> > > >
> > > > soap:Client
> > > > Server was unable to read request. --> There
> > is
> > > an error i
> > > > n XML document (2, 565). --> String was not recognized as a
valid
> > > DateTime.> > faultstring>
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > The strange thing here is, the error message says that the error
> is
> > at
> > > column 565 which is surprisingly time. Does this mean that
> > > the time is in correct format?
> > > >
> > > > Thanks!!
> > > >
> > > > Scott Nichol wrote:Can you post the
> > > WSDL for the C# web service?
> > > >
> > > > Scott Nichol
> > > >
> > > > ----- Original Message -----
> > > > From: "Siddhartha Mehta"
> > > > To:
> > > > Sent: Tuesday, December 17, 2002 6:55 PM
> > > > Subject: Using DateTime object
> > > >
> > > >
> > > > >
> > > > > I am using C# webservice and a Java client. One of the
functions
> > in
> > > my
> > > > webservice expects a DateTime (C# object). How would I send a
> > datetime
> > > > object from my Java client code? Can anyone help me.
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Siddhartha
> > > > >
> > > > >
> > > > >
> > > > > ---------------------------------
> > > > > Do you Yahoo!?
> > > > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > > For additional commands, e-mail:
> > > >
> > > >
> > > >
> > > > ---------------------------------
> > > > Do you Yahoo!?
> > > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> >
> > > For additional commands, e-mail:
> >
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > For additional commands, e-mail:
> >
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
>
>
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

Re: Using DateTime object

Posted by Scott Nichol <sn...@scottnichol.com>.
What makes you think the pattern is exactly what C# is expecting?  The
WSDL snippet you posted shows the data type is supposed to be
xsd:dateTime.  The format you show is "12/17/2002 4:39:40 PM", which is
not a valid xsd:dateTime.  See
http://www.w3.org/TR/xmlschema-2/#dateTime for documentation of the XML
Schema dateTime type.

Someplace within JAXP is the ability to serialize a Java Date into XSD's
dateTime format, I'm sure.

Scott Nichol

----- Original Message -----
From: "Siddhartha Mehta" <si...@yahoo.com>
To: <so...@xml.apache.org>
Sent: Tuesday, December 17, 2002 8:38 PM
Subject: Re: Using DateTime object


>
> I'd also like to add that I am using Java's Date object. In fact I am
using SimpleDateFormat with the pattern exactly similar to what C# is
expecting. Also the error message indicates the error for Modified time
and that is after Created time. So just wondering if it accepts the
Created time format.
> Thanks!
>  Scott Nichol <sn...@scottnichol.com> wrote:OK, a few things.
>
> 1. This list is just for Apache SOAP.
>
> 2. You still have not given the WSDL. It's what you'll get back if you
> point your browser to your service with a query string of ?wsdl, e.g.
a
> URL like http://storagepoint.net/soap/service.asmx?wsdl.
>
> 3. If Microsoft maps a .NET DateTime to xsd:dateTime, I would try a
Java
> java.util.Date, which I would guess JAXP would map to xsd:dateTime. In
> any case, since the parameters are using literal style, you should not
> be specifying any xsi:type attribute: just get rid of that code.
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Siddhartha Mehta"
> To:
> Sent: Tuesday, December 17, 2002 8:07 PM
> Subject: Re: Using DateTime object
>
>
> >
> > Oh.. I pasted the wrong code. Here is my function in C# I am trying
to
> access:
> >
> > [WebMethod(Description = "Start uploading a file.")]
> >
> > public bool UploadStart(string SessionKey,
> >
> > long FolderId,
> >
> > string FileName,
> >
> > sbyte bUseCompression,
> >
> > long UncompressedSize,
> >
> > System.DateTime Created,
> >
> > System.DateTime Modified,
> >
> > System.DateTime Accessed,
> >
> > ref string StreamToken)
> >
> >
> > Next, I am not using APACHE. I am using JAXP (sun's Java XML Pack).
> The code that generates the request is:
> >
> > SOAPMessage message = GetSOAPMessage();
> > MimeHeaders headers = GetMimeHeaders(message);
> > SOAPPart soapPart = GetSOAPPart(message);
> > SOAPEnvelope soapEnvelope = GetSOAPEnvelope(soapPart);
> > SOAPBody soapBody = GetSOAPBody(soapEnvelope);
> >
> > headers.setHeader(Definition.SOAP_ACTION,
> Definition.URL_UPLOAD_START);
> > Name bodyName =
> soapEnvelope.createName(Definition.FUNCTION_UPLOAD_START, "",
> "http://storagepoint.net/soap/");
> > SOAPElement soapElement = soapBody.addBodyElement(bodyName);
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.SESSION_K
> EY)).addTextNode(sessionKey);
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.FOLDER_ID
> )).addTextNode(strFolderId);
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.FILE_NAME
> )).addTextNode(fileName_);
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.USE_COMPR
> ESSION)).addTextNode("0");
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.SIZE)).ad
> dTextNode(strSize);
> >
> > SOAPElement soapElementCreated =
> soapElement.addChildElement(Definition.CREATED);
> > soapElement.addNamespaceDeclaration("A",
> "http://www.w3.org/2001/XMLSchema-instance");
> > Name xsiType = soapEnvelope.createName("type", "A",
> "http://www.w3.org/2001/XMLSchema-instance");
> > soapElementCreated.addAttribute(xsiType, "DateTime");
> > soapElementCreated.addTextNode(strDate);
> >
> > SOAPElement soapElementModified =
> soapElement.addChildElement(Definition.MODIFIED);
> > soapElement.addNamespaceDeclaration("B",
> "http://www.w3.org/2001/XMLSchema-instance");
> > Name xsiType1 = soapEnvelope.createName("type1", "B",
> "http://www.w3.org/2001/XMLSchema-instance");
> > soapElementModified.addAttribute(xsiType1, "DateTime");
> > soapElementModified.addTextNode(strDate);
> >
> > SOAPElement soapElementAccessed =
> soapElement.addChildElement(Definition.ACCESSED);
> > soapElement.addNamespaceDeclaration("C",
> "http://www.w3.org/2001/XMLSchema-instance");
> > Name xsiType2 = soapEnvelope.createName("type2", "C",
> "http://www.w3.org/2001/XMLSchema-instance");
> > soapElementAccessed.addAttribute(xsiType2, "DateTime");
> > soapElementAccessed.addTextNode(strDate);
> >
> > Scott Nichol wrote:Actually, the code
> you included looks more like a client proxy than a
> > service. Also, what code generates the request that you show? I
don't
> > see how Apache SOAP would generate that message.
> >
> > Scott Nichol
> >
> > ----- Original Message -----
> > From: "Scott Nichol"
> > To:
> > Sent: Tuesday, December 17, 2002 7:59 PM
> > Subject: Re: Using DateTime object
> >
> >
> > > Honestly, the WSDL is what I would need. I don't have time to
create
> > a
> > > .NET service based on your code and look at the WSDL myself.
> > >
> > > Scott Nichol
> > >
> > > ----- Original Message -----
> > > From: "Siddhartha Mehta"
> > > To:
> > > Sent: Tuesday, December 17, 2002 7:43 PM
> > > Subject: Re: Using DateTime object
> > >
> > >
> > > >
> > > > Here is my C# webservice:
> > > >
> > > >
> > >
> >
>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://stora
> > > gepoint.net/soap/UploadStart",
> > > RequestNamespace="http://storagepoint.net/soap/",
> > > ResponseNamespace="http://storagepoint.net/soap/",
> > > Use=System.Web.Services.Description.SoapBindingUse.Literal,
> > >
> >
>
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)
> > > ]
> > > >
> > > > public bool UploadStart(string SessionKey, long FolderId, string
> > > FileName, System.SByte bUseCompression, long UncompressedSize,
> > > System.DateTime Created, System.DateTime Modified, System.DateTime
> > > Accessed, ref string StreamToken) {
> > > >
> > > > object[] results = this.Invoke("UploadStart", new object[] {
> > > >
> > > > SessionKey,
> > > >
> > > > FolderId,
> > > >
> > > > FileName,
> > > >
> > > > bUseCompression,
> > > >
> > > > UncompressedSize,
> > > >
> > > > Created,
> > > >
> > > > Modified,
> > > >
> > > > Accessed,
> > > >
> > > > StreamToken});
> > > >
> > > > StreamToken = ((string)(results[1]));
> > > >
> > > > return ((bool)(results[0]));
> > > >
> > > > }
> > > >
> > > >
> > > > And the SOAP message that is sent is:
> > > >
> > > >
> > > >
> > > > >
> > xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">> der/>
> > > >
> > > > > xmlns:A="http://www.w3.org/2001/XMLSchema-instance"
> > > xmlns:B="http://www.w3.org/2001/XMLSchema-instance"
> > > xmlns:C="http://www.w3.org/2001/XMLSchema-instance">
> > > >
> > > > 5617F6B2-AEAB-45CF-80C2-ED0379109DD9
> > > >
> > > > 8
> > > >
> > > > run.cmd
> > > >
> > > > 0
> > > >
> > > > 695
> > > >
> > > > 12/17/2002 4:39:40 PM
> > > >
> > > > 12/17/2002 4:39:40 PM
> > > >
> > > > 12/17/2002 4:39:40 PM
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > And the error I get is:
> > > >
> > > >
> > > > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> > > >
> > > >
> > > > soap:Client
> > > > Server was unable to read request. --> There
> > is
> > > an error i
> > > > n XML document (2, 565). --> String was not recognized as a
valid
> > > DateTime.> > faultstring>
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > The strange thing here is, the error message says that the error
> is
> > at
> > > column 565 which is surprisingly time. Does this mean that
> > > the time is in correct format?
> > > >
> > > > Thanks!!
> > > >
> > > > Scott Nichol wrote:Can you post the
> > > WSDL for the C# web service?
> > > >
> > > > Scott Nichol
> > > >
> > > > ----- Original Message -----
> > > > From: "Siddhartha Mehta"
> > > > To:
> > > > Sent: Tuesday, December 17, 2002 6:55 PM
> > > > Subject: Using DateTime object
> > > >
> > > >
> > > > >
> > > > > I am using C# webservice and a Java client. One of the
functions
> > in
> > > my
> > > > webservice expects a DateTime (C# object). How would I send a
> > datetime
> > > > object from my Java client code? Can anyone help me.
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Siddhartha
> > > > >
> > > > >
> > > > >
> > > > > ---------------------------------
> > > > > Do you Yahoo!?
> > > > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > > For additional commands, e-mail:
> > > >
> > > >
> > > >
> > > > ---------------------------------
> > > > Do you Yahoo!?
> > > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> >
> > > For additional commands, e-mail:
> >
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > For additional commands, e-mail:
> >
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
>
>
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now


Re: Using DateTime object

Posted by Scott Nichol <sn...@scottnichol.com>.
What makes you think the pattern is exactly what C# is expecting?  The
WSDL snippet you posted shows the data type is supposed to be
xsd:dateTime.  The format you show is "12/17/2002 4:39:40 PM", which is
not a valid xsd:dateTime.  See
http://www.w3.org/TR/xmlschema-2/#dateTime for documentation of the XML
Schema dateTime type.

Someplace within JAXP is the ability to serialize a Java Date into XSD's
dateTime format, I'm sure.

Scott Nichol

----- Original Message -----
From: "Siddhartha Mehta" <si...@yahoo.com>
To: <so...@xml.apache.org>
Sent: Tuesday, December 17, 2002 8:38 PM
Subject: Re: Using DateTime object


>
> I'd also like to add that I am using Java's Date object. In fact I am
using SimpleDateFormat with the pattern exactly similar to what C# is
expecting. Also the error message indicates the error for Modified time
and that is after Created time. So just wondering if it accepts the
Created time format.
> Thanks!
>  Scott Nichol <sn...@scottnichol.com> wrote:OK, a few things.
>
> 1. This list is just for Apache SOAP.
>
> 2. You still have not given the WSDL. It's what you'll get back if you
> point your browser to your service with a query string of ?wsdl, e.g.
a
> URL like http://storagepoint.net/soap/service.asmx?wsdl.
>
> 3. If Microsoft maps a .NET DateTime to xsd:dateTime, I would try a
Java
> java.util.Date, which I would guess JAXP would map to xsd:dateTime. In
> any case, since the parameters are using literal style, you should not
> be specifying any xsi:type attribute: just get rid of that code.
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Siddhartha Mehta"
> To:
> Sent: Tuesday, December 17, 2002 8:07 PM
> Subject: Re: Using DateTime object
>
>
> >
> > Oh.. I pasted the wrong code. Here is my function in C# I am trying
to
> access:
> >
> > [WebMethod(Description = "Start uploading a file.")]
> >
> > public bool UploadStart(string SessionKey,
> >
> > long FolderId,
> >
> > string FileName,
> >
> > sbyte bUseCompression,
> >
> > long UncompressedSize,
> >
> > System.DateTime Created,
> >
> > System.DateTime Modified,
> >
> > System.DateTime Accessed,
> >
> > ref string StreamToken)
> >
> >
> > Next, I am not using APACHE. I am using JAXP (sun's Java XML Pack).
> The code that generates the request is:
> >
> > SOAPMessage message = GetSOAPMessage();
> > MimeHeaders headers = GetMimeHeaders(message);
> > SOAPPart soapPart = GetSOAPPart(message);
> > SOAPEnvelope soapEnvelope = GetSOAPEnvelope(soapPart);
> > SOAPBody soapBody = GetSOAPBody(soapEnvelope);
> >
> > headers.setHeader(Definition.SOAP_ACTION,
> Definition.URL_UPLOAD_START);
> > Name bodyName =
> soapEnvelope.createName(Definition.FUNCTION_UPLOAD_START, "",
> "http://storagepoint.net/soap/");
> > SOAPElement soapElement = soapBody.addBodyElement(bodyName);
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.SESSION_K
> EY)).addTextNode(sessionKey);
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.FOLDER_ID
> )).addTextNode(strFolderId);
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.FILE_NAME
> )).addTextNode(fileName_);
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.USE_COMPR
> ESSION)).addTextNode("0");
> >
>
soapElement.addChildElement(soapEnvelope.createName(Definition.SIZE)).ad
> dTextNode(strSize);
> >
> > SOAPElement soapElementCreated =
> soapElement.addChildElement(Definition.CREATED);
> > soapElement.addNamespaceDeclaration("A",
> "http://www.w3.org/2001/XMLSchema-instance");
> > Name xsiType = soapEnvelope.createName("type", "A",
> "http://www.w3.org/2001/XMLSchema-instance");
> > soapElementCreated.addAttribute(xsiType, "DateTime");
> > soapElementCreated.addTextNode(strDate);
> >
> > SOAPElement soapElementModified =
> soapElement.addChildElement(Definition.MODIFIED);
> > soapElement.addNamespaceDeclaration("B",
> "http://www.w3.org/2001/XMLSchema-instance");
> > Name xsiType1 = soapEnvelope.createName("type1", "B",
> "http://www.w3.org/2001/XMLSchema-instance");
> > soapElementModified.addAttribute(xsiType1, "DateTime");
> > soapElementModified.addTextNode(strDate);
> >
> > SOAPElement soapElementAccessed =
> soapElement.addChildElement(Definition.ACCESSED);
> > soapElement.addNamespaceDeclaration("C",
> "http://www.w3.org/2001/XMLSchema-instance");
> > Name xsiType2 = soapEnvelope.createName("type2", "C",
> "http://www.w3.org/2001/XMLSchema-instance");
> > soapElementAccessed.addAttribute(xsiType2, "DateTime");
> > soapElementAccessed.addTextNode(strDate);
> >
> > Scott Nichol wrote:Actually, the code
> you included looks more like a client proxy than a
> > service. Also, what code generates the request that you show? I
don't
> > see how Apache SOAP would generate that message.
> >
> > Scott Nichol
> >
> > ----- Original Message -----
> > From: "Scott Nichol"
> > To:
> > Sent: Tuesday, December 17, 2002 7:59 PM
> > Subject: Re: Using DateTime object
> >
> >
> > > Honestly, the WSDL is what I would need. I don't have time to
create
> > a
> > > .NET service based on your code and look at the WSDL myself.
> > >
> > > Scott Nichol
> > >
> > > ----- Original Message -----
> > > From: "Siddhartha Mehta"
> > > To:
> > > Sent: Tuesday, December 17, 2002 7:43 PM
> > > Subject: Re: Using DateTime object
> > >
> > >
> > > >
> > > > Here is my C# webservice:
> > > >
> > > >
> > >
> >
>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://stora
> > > gepoint.net/soap/UploadStart",
> > > RequestNamespace="http://storagepoint.net/soap/",
> > > ResponseNamespace="http://storagepoint.net/soap/",
> > > Use=System.Web.Services.Description.SoapBindingUse.Literal,
> > >
> >
>
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)
> > > ]
> > > >
> > > > public bool UploadStart(string SessionKey, long FolderId, string
> > > FileName, System.SByte bUseCompression, long UncompressedSize,
> > > System.DateTime Created, System.DateTime Modified, System.DateTime
> > > Accessed, ref string StreamToken) {
> > > >
> > > > object[] results = this.Invoke("UploadStart", new object[] {
> > > >
> > > > SessionKey,
> > > >
> > > > FolderId,
> > > >
> > > > FileName,
> > > >
> > > > bUseCompression,
> > > >
> > > > UncompressedSize,
> > > >
> > > > Created,
> > > >
> > > > Modified,
> > > >
> > > > Accessed,
> > > >
> > > > StreamToken});
> > > >
> > > > StreamToken = ((string)(results[1]));
> > > >
> > > > return ((bool)(results[0]));
> > > >
> > > > }
> > > >
> > > >
> > > > And the SOAP message that is sent is:
> > > >
> > > >
> > > >
> > > > >
> > xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">> der/>
> > > >
> > > > > xmlns:A="http://www.w3.org/2001/XMLSchema-instance"
> > > xmlns:B="http://www.w3.org/2001/XMLSchema-instance"
> > > xmlns:C="http://www.w3.org/2001/XMLSchema-instance">
> > > >
> > > > 5617F6B2-AEAB-45CF-80C2-ED0379109DD9
> > > >
> > > > 8
> > > >
> > > > run.cmd
> > > >
> > > > 0
> > > >
> > > > 695
> > > >
> > > > 12/17/2002 4:39:40 PM
> > > >
> > > > 12/17/2002 4:39:40 PM
> > > >
> > > > 12/17/2002 4:39:40 PM
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > And the error I get is:
> > > >
> > > >
> > > > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> > > >
> > > >
> > > > soap:Client
> > > > Server was unable to read request. --> There
> > is
> > > an error i
> > > > n XML document (2, 565). --> String was not recognized as a
valid
> > > DateTime.> > faultstring>
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > The strange thing here is, the error message says that the error
> is
> > at
> > > column 565 which is surprisingly time. Does this mean that
> > > the time is in correct format?
> > > >
> > > > Thanks!!
> > > >
> > > > Scott Nichol wrote:Can you post the
> > > WSDL for the C# web service?
> > > >
> > > > Scott Nichol
> > > >
> > > > ----- Original Message -----
> > > > From: "Siddhartha Mehta"
> > > > To:
> > > > Sent: Tuesday, December 17, 2002 6:55 PM
> > > > Subject: Using DateTime object
> > > >
> > > >
> > > > >
> > > > > I am using C# webservice and a Java client. One of the
functions
> > in
> > > my
> > > > webservice expects a DateTime (C# object). How would I send a
> > datetime
> > > > object from my Java client code? Can anyone help me.
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Siddhartha
> > > > >
> > > > >
> > > > >
> > > > > ---------------------------------
> > > > > Do you Yahoo!?
> > > > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > > For additional commands, e-mail:
> > > >
> > > >
> > > >
> > > > ---------------------------------
> > > > Do you Yahoo!?
> > > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> >
> > > For additional commands, e-mail:
> >
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> > For additional commands, e-mail:
> >
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
>
>
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now


Re: Using DateTime object

Posted by Siddhartha Mehta <si...@yahoo.com>.
I'd also like to add that I am using Java's Date object. In fact I am using SimpleDateFormat with the pattern exactly similar to what C# is expecting. Also the error message indicates the error for Modified time and that is after Created time. So just wondering if it accepts the Created time format.
Thanks!
 Scott Nichol <sn...@scottnichol.com> wrote:OK, a few things.

1. This list is just for Apache SOAP.

2. You still have not given the WSDL. It's what you'll get back if you
point your browser to your service with a query string of ?wsdl, e.g. a
URL like http://storagepoint.net/soap/service.asmx?wsdl.

3. If Microsoft maps a .NET DateTime to xsd:dateTime, I would try a Java
java.util.Date, which I would guess JAXP would map to xsd:dateTime. In
any case, since the parameters are using literal style, you should not
be specifying any xsi:type attribute: just get rid of that code.

Scott Nichol

----- Original Message -----
From: "Siddhartha Mehta" 
To: 
Sent: Tuesday, December 17, 2002 8:07 PM
Subject: Re: Using DateTime object


>
> Oh.. I pasted the wrong code. Here is my function in C# I am trying to
access:
>
> [WebMethod(Description = "Start uploading a file.")]
>
> public bool UploadStart(string SessionKey,
>
> long FolderId,
>
> string FileName,
>
> sbyte bUseCompression,
>
> long UncompressedSize,
>
> System.DateTime Created,
>
> System.DateTime Modified,
>
> System.DateTime Accessed,
>
> ref string StreamToken)
>
>
> Next, I am not using APACHE. I am using JAXP (sun's Java XML Pack).
The code that generates the request is:
>
> SOAPMessage message = GetSOAPMessage();
> MimeHeaders headers = GetMimeHeaders(message);
> SOAPPart soapPart = GetSOAPPart(message);
> SOAPEnvelope soapEnvelope = GetSOAPEnvelope(soapPart);
> SOAPBody soapBody = GetSOAPBody(soapEnvelope);
>
> headers.setHeader(Definition.SOAP_ACTION,
Definition.URL_UPLOAD_START);
> Name bodyName =
soapEnvelope.createName(Definition.FUNCTION_UPLOAD_START, "",
"http://storagepoint.net/soap/");
> SOAPElement soapElement = soapBody.addBodyElement(bodyName);
>
soapElement.addChildElement(soapEnvelope.createName(Definition.SESSION_K
EY)).addTextNode(sessionKey);
>
soapElement.addChildElement(soapEnvelope.createName(Definition.FOLDER_ID
)).addTextNode(strFolderId);
>
soapElement.addChildElement(soapEnvelope.createName(Definition.FILE_NAME
)).addTextNode(fileName_);
>
soapElement.addChildElement(soapEnvelope.createName(Definition.USE_COMPR
ESSION)).addTextNode("0");
>
soapElement.addChildElement(soapEnvelope.createName(Definition.SIZE)).ad
dTextNode(strSize);
>
> SOAPElement soapElementCreated =
soapElement.addChildElement(Definition.CREATED);
> soapElement.addNamespaceDeclaration("A",
"http://www.w3.org/2001/XMLSchema-instance");
> Name xsiType = soapEnvelope.createName("type", "A",
"http://www.w3.org/2001/XMLSchema-instance");
> soapElementCreated.addAttribute(xsiType, "DateTime");
> soapElementCreated.addTextNode(strDate);
>
> SOAPElement soapElementModified =
soapElement.addChildElement(Definition.MODIFIED);
> soapElement.addNamespaceDeclaration("B",
"http://www.w3.org/2001/XMLSchema-instance");
> Name xsiType1 = soapEnvelope.createName("type1", "B",
"http://www.w3.org/2001/XMLSchema-instance");
> soapElementModified.addAttribute(xsiType1, "DateTime");
> soapElementModified.addTextNode(strDate);
>
> SOAPElement soapElementAccessed =
soapElement.addChildElement(Definition.ACCESSED);
> soapElement.addNamespaceDeclaration("C",
"http://www.w3.org/2001/XMLSchema-instance");
> Name xsiType2 = soapEnvelope.createName("type2", "C",
"http://www.w3.org/2001/XMLSchema-instance");
> soapElementAccessed.addAttribute(xsiType2, "DateTime");
> soapElementAccessed.addTextNode(strDate);
>
> Scott Nichol wrote:Actually, the code
you included looks more like a client proxy than a
> service. Also, what code generates the request that you show? I don't
> see how Apache SOAP would generate that message.
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Scott Nichol"
> To:
> Sent: Tuesday, December 17, 2002 7:59 PM
> Subject: Re: Using DateTime object
>
>
> > Honestly, the WSDL is what I would need. I don't have time to create
> a
> > .NET service based on your code and look at the WSDL myself.
> >
> > Scott Nichol
> >
> > ----- Original Message -----
> > From: "Siddhartha Mehta"
> > To:
> > Sent: Tuesday, December 17, 2002 7:43 PM
> > Subject: Re: Using DateTime object
> >
> >
> > >
> > > Here is my C# webservice:
> > >
> > >
> >
>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://stora
> > gepoint.net/soap/UploadStart",
> > RequestNamespace="http://storagepoint.net/soap/",
> > ResponseNamespace="http://storagepoint.net/soap/",
> > Use=System.Web.Services.Description.SoapBindingUse.Literal,
> >
>
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)
> > ]
> > >
> > > public bool UploadStart(string SessionKey, long FolderId, string
> > FileName, System.SByte bUseCompression, long UncompressedSize,
> > System.DateTime Created, System.DateTime Modified, System.DateTime
> > Accessed, ref string StreamToken) {
> > >
> > > object[] results = this.Invoke("UploadStart", new object[] {
> > >
> > > SessionKey,
> > >
> > > FolderId,
> > >
> > > FileName,
> > >
> > > bUseCompression,
> > >
> > > UncompressedSize,
> > >
> > > Created,
> > >
> > > Modified,
> > >
> > > Accessed,
> > >
> > > StreamToken});
> > >
> > > StreamToken = ((string)(results[1]));
> > >
> > > return ((bool)(results[0]));
> > >
> > > }
> > >
> > >
> > > And the SOAP message that is sent is:
> > >
> > >
> > >
> > > >
> xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">> der/>
> > >
> > > > xmlns:A="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:B="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:C="http://www.w3.org/2001/XMLSchema-instance">
> > >
> > > 5617F6B2-AEAB-45CF-80C2-ED0379109DD9
> > >
> > > 8
> > >
> > > run.cmd
> > >
> > > 0
> > >
> > > 695
> > >
> > > 12/17/2002 4:39:40 PM
> > >
> > > 12/17/2002 4:39:40 PM
> > >
> > > 12/17/2002 4:39:40 PM
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > And the error I get is:
> > >
> > >
> > > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> > >
> > >
> > > soap:Client
> > > Server was unable to read request. --> There
> is
> > an error i
> > > n XML document (2, 565). --> String was not recognized as a valid
> > DateTime.> > faultstring>
> > >
> > >
> > >
> > >
> > >
> > > The strange thing here is, the error message says that the error
is
> at
> > column 565 which is surprisingly time. Does this mean that
> > the time is in correct format?
> > >
> > > Thanks!!
> > >
> > > Scott Nichol wrote:Can you post the
> > WSDL for the C# web service?
> > >
> > > Scott Nichol
> > >
> > > ----- Original Message -----
> > > From: "Siddhartha Mehta"
> > > To:
> > > Sent: Tuesday, December 17, 2002 6:55 PM
> > > Subject: Using DateTime object
> > >
> > >
> > > >
> > > > I am using C# webservice and a Java client. One of the functions
> in
> > my
> > > webservice expects a DateTime (C# object). How would I send a
> datetime
> > > object from my Java client code? Can anyone help me.
> > > >
> > > > Thanks,
> > > >
> > > > Siddhartha
> > > >
> > > >
> > > >
> > > > ---------------------------------
> > > > Do you Yahoo!?
> > > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > For additional commands, e-mail:
> > >
> > >
> > >
> > > ---------------------------------
> > > Do you Yahoo!?
> > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> >
> >
> > --
> > To unsubscribe, e-mail:
>
> > For additional commands, e-mail:
>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

Re: Using DateTime object

Posted by Siddhartha Mehta <si...@yahoo.com>.
Yes, I do know that this list just for the APACHE SOAP. I have posted questions on several sites including the Sun's but didn't get a reply, so just thought of asking here. I have pasted below the wsdl code.- <s:element name="UploadStart">- <s:complexType>- <s:sequence>  <s:element minOccurs="0" maxOccurs="1" name="SessionKey" type="s:string" />   <s:element minOccurs="1" maxOccurs="1" name="FolderId" type="s:long" />   <s:element minOccurs="0" maxOccurs="1" name="FileName" type="s:string" />   <s:element minOccurs="1" maxOccurs="1" name="bUseCompression" type="s:byte" />   <s:element minOccurs="1" maxOccurs="1" name="UncompressedSize" type="s:long" />   <s:element minOccurs="1" maxOccurs="1" name="Created" type="s:dateTime" />   <s:element minOccurs="1" maxOccurs="1" name="Modified" type="s:dateTime" />   <s:element minOccurs="1" maxOccurs="1" name="Accessed" type="s:dateTime" />   <s:element minOccurs="0" maxOccurs="1" name="StreamToken" type="s:string" />   </s:sequence>  </s:complexType>  </s:element>- <s:element name="UploadStartResponse">- <s:complexType>- <s:sequence>  <s:element minOccurs="1" maxOccurs="1" name="UploadStartResult" type="s:boolean" />   <s:element minOccurs="0" maxOccurs="1" name="StreamToken" type="s:string" />   </s:sequence>  </s:complexType>  </s:element> Thanks!!
 Scott Nichol <sn...@scottnichol.com> wrote:OK, a few things.

1. This list is just for Apache SOAP.

2. You still have not given the WSDL. It's what you'll get back if you
point your browser to your service with a query string of ?wsdl, e.g. a
URL like http://storagepoint.net/soap/service.asmx?wsdl.

3. If Microsoft maps a .NET DateTime to xsd:dateTime, I would try a Java
java.util.Date, which I would guess JAXP would map to xsd:dateTime. In
any case, since the parameters are using literal style, you should not
be specifying any xsi:type attribute: just get rid of that code.

Scott Nichol

----- Original Message -----
From: "Siddhartha Mehta" 
To: 
Sent: Tuesday, December 17, 2002 8:07 PM
Subject: Re: Using DateTime object


>
> Oh.. I pasted the wrong code. Here is my function in C# I am trying to
access:
>
> [WebMethod(Description = "Start uploading a file.")]
>
> public bool UploadStart(string SessionKey,
>
> long FolderId,
>
> string FileName,
>
> sbyte bUseCompression,
>
> long UncompressedSize,
>
> System.DateTime Created,
>
> System.DateTime Modified,
>
> System.DateTime Accessed,
>
> ref string StreamToken)
>
>
> Next, I am not using APACHE. I am using JAXP (sun's Java XML Pack).
The code that generates the request is:
>
> SOAPMessage message = GetSOAPMessage();
> MimeHeaders headers = GetMimeHeaders(message);
> SOAPPart soapPart = GetSOAPPart(message);
> SOAPEnvelope soapEnvelope = GetSOAPEnvelope(soapPart);
> SOAPBody soapBody = GetSOAPBody(soapEnvelope);
>
> headers.setHeader(Definition.SOAP_ACTION,
Definition.URL_UPLOAD_START);
> Name bodyName =
soapEnvelope.createName(Definition.FUNCTION_UPLOAD_START, "",
"http://storagepoint.net/soap/");
> SOAPElement soapElement = soapBody.addBodyElement(bodyName);
>
soapElement.addChildElement(soapEnvelope.createName(Definition.SESSION_K
EY)).addTextNode(sessionKey);
>
soapElement.addChildElement(soapEnvelope.createName(Definition.FOLDER_ID
)).addTextNode(strFolderId);
>
soapElement.addChildElement(soapEnvelope.createName(Definition.FILE_NAME
)).addTextNode(fileName_);
>
soapElement.addChildElement(soapEnvelope.createName(Definition.USE_COMPR
ESSION)).addTextNode("0");
>
soapElement.addChildElement(soapEnvelope.createName(Definition.SIZE)).ad
dTextNode(strSize);
>
> SOAPElement soapElementCreated =
soapElement.addChildElement(Definition.CREATED);
> soapElement.addNamespaceDeclaration("A",
"http://www.w3.org/2001/XMLSchema-instance");
> Name xsiType = soapEnvelope.createName("type", "A",
"http://www.w3.org/2001/XMLSchema-instance");
> soapElementCreated.addAttribute(xsiType, "DateTime");
> soapElementCreated.addTextNode(strDate);
>
> SOAPElement soapElementModified =
soapElement.addChildElement(Definition.MODIFIED);
> soapElement.addNamespaceDeclaration("B",
"http://www.w3.org/2001/XMLSchema-instance");
> Name xsiType1 = soapEnvelope.createName("type1", "B",
"http://www.w3.org/2001/XMLSchema-instance");
> soapElementModified.addAttribute(xsiType1, "DateTime");
> soapElementModified.addTextNode(strDate);
>
> SOAPElement soapElementAccessed =
soapElement.addChildElement(Definition.ACCESSED);
> soapElement.addNamespaceDeclaration("C",
"http://www.w3.org/2001/XMLSchema-instance");
> Name xsiType2 = soapEnvelope.createName("type2", "C",
"http://www.w3.org/2001/XMLSchema-instance");
> soapElementAccessed.addAttribute(xsiType2, "DateTime");
> soapElementAccessed.addTextNode(strDate);
>
> Scott Nichol wrote:Actually, the code
you included looks more like a client proxy than a
> service. Also, what code generates the request that you show? I don't
> see how Apache SOAP would generate that message.
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Scott Nichol"
> To:
> Sent: Tuesday, December 17, 2002 7:59 PM
> Subject: Re: Using DateTime object
>
>
> > Honestly, the WSDL is what I would need. I don't have time to create
> a
> > .NET service based on your code and look at the WSDL myself.
> >
> > Scott Nichol
> >
> > ----- Original Message -----
> > From: "Siddhartha Mehta"
> > To:
> > Sent: Tuesday, December 17, 2002 7:43 PM
> > Subject: Re: Using DateTime object
> >
> >
> > >
> > > Here is my C# webservice:
> > >
> > >
> >
>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://stora
> > gepoint.net/soap/UploadStart",
> > RequestNamespace="http://storagepoint.net/soap/",
> > ResponseNamespace="http://storagepoint.net/soap/",
> > Use=System.Web.Services.Description.SoapBindingUse.Literal,
> >
>
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)
> > ]
> > >
> > > public bool UploadStart(string SessionKey, long FolderId, string
> > FileName, System.SByte bUseCompression, long UncompressedSize,
> > System.DateTime Created, System.DateTime Modified, System.DateTime
> > Accessed, ref string StreamToken) {
> > >
> > > object[] results = this.Invoke("UploadStart", new object[] {
> > >
> > > SessionKey,
> > >
> > > FolderId,
> > >
> > > FileName,
> > >
> > > bUseCompression,
> > >
> > > UncompressedSize,
> > >
> > > Created,
> > >
> > > Modified,
> > >
> > > Accessed,
> > >
> > > StreamToken});
> > >
> > > StreamToken = ((string)(results[1]));
> > >
> > > return ((bool)(results[0]));
> > >
> > > }
> > >
> > >
> > > And the SOAP message that is sent is:
> > >
> > >
> > >
> > > >
> xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">> der/>
> > >
> > > > xmlns:A="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:B="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:C="http://www.w3.org/2001/XMLSchema-instance">
> > >
> > > 5617F6B2-AEAB-45CF-80C2-ED0379109DD9
> > >
> > > 8
> > >
> > > run.cmd
> > >
> > > 0
> > >
> > > 695
> > >
> > > 12/17/2002 4:39:40 PM
> > >
> > > 12/17/2002 4:39:40 PM
> > >
> > > 12/17/2002 4:39:40 PM
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > And the error I get is:
> > >
> > >
> > > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> > >
> > >
> > > soap:Client
> > > Server was unable to read request. --> There
> is
> > an error i
> > > n XML document (2, 565). --> String was not recognized as a valid
> > DateTime.> > faultstring>
> > >
> > >
> > >
> > >
> > >
> > > The strange thing here is, the error message says that the error
is
> at
> > column 565 which is surprisingly time. Does this mean that
> > the time is in correct format?
> > >
> > > Thanks!!
> > >
> > > Scott Nichol wrote:Can you post the
> > WSDL for the C# web service?
> > >
> > > Scott Nichol
> > >
> > > ----- Original Message -----
> > > From: "Siddhartha Mehta"
> > > To:
> > > Sent: Tuesday, December 17, 2002 6:55 PM
> > > Subject: Using DateTime object
> > >
> > >
> > > >
> > > > I am using C# webservice and a Java client. One of the functions
> in
> > my
> > > webservice expects a DateTime (C# object). How would I send a
> datetime
> > > object from my Java client code? Can anyone help me.
> > > >
> > > > Thanks,
> > > >
> > > > Siddhartha
> > > >
> > > >
> > > >
> > > > ---------------------------------
> > > > Do you Yahoo!?
> > > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > For additional commands, e-mail:
> > >
> > >
> > >
> > > ---------------------------------
> > > Do you Yahoo!?
> > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> >
> >
> > --
> > To unsubscribe, e-mail:
>
> > For additional commands, e-mail:
>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

Re: Using DateTime object

Posted by Siddhartha Mehta <si...@yahoo.com>.
I'd also like to add that I am using Java's Date object. In fact I am using SimpleDateFormat with the pattern exactly similar to what C# is expecting. Also the error message indicates the error for Modified time and that is after Created time. So just wondering if it accepts the Created time format.
Thanks!
 Scott Nichol <sn...@scottnichol.com> wrote:OK, a few things.

1. This list is just for Apache SOAP.

2. You still have not given the WSDL. It's what you'll get back if you
point your browser to your service with a query string of ?wsdl, e.g. a
URL like http://storagepoint.net/soap/service.asmx?wsdl.

3. If Microsoft maps a .NET DateTime to xsd:dateTime, I would try a Java
java.util.Date, which I would guess JAXP would map to xsd:dateTime. In
any case, since the parameters are using literal style, you should not
be specifying any xsi:type attribute: just get rid of that code.

Scott Nichol

----- Original Message -----
From: "Siddhartha Mehta" 
To: 
Sent: Tuesday, December 17, 2002 8:07 PM
Subject: Re: Using DateTime object


>
> Oh.. I pasted the wrong code. Here is my function in C# I am trying to
access:
>
> [WebMethod(Description = "Start uploading a file.")]
>
> public bool UploadStart(string SessionKey,
>
> long FolderId,
>
> string FileName,
>
> sbyte bUseCompression,
>
> long UncompressedSize,
>
> System.DateTime Created,
>
> System.DateTime Modified,
>
> System.DateTime Accessed,
>
> ref string StreamToken)
>
>
> Next, I am not using APACHE. I am using JAXP (sun's Java XML Pack).
The code that generates the request is:
>
> SOAPMessage message = GetSOAPMessage();
> MimeHeaders headers = GetMimeHeaders(message);
> SOAPPart soapPart = GetSOAPPart(message);
> SOAPEnvelope soapEnvelope = GetSOAPEnvelope(soapPart);
> SOAPBody soapBody = GetSOAPBody(soapEnvelope);
>
> headers.setHeader(Definition.SOAP_ACTION,
Definition.URL_UPLOAD_START);
> Name bodyName =
soapEnvelope.createName(Definition.FUNCTION_UPLOAD_START, "",
"http://storagepoint.net/soap/");
> SOAPElement soapElement = soapBody.addBodyElement(bodyName);
>
soapElement.addChildElement(soapEnvelope.createName(Definition.SESSION_K
EY)).addTextNode(sessionKey);
>
soapElement.addChildElement(soapEnvelope.createName(Definition.FOLDER_ID
)).addTextNode(strFolderId);
>
soapElement.addChildElement(soapEnvelope.createName(Definition.FILE_NAME
)).addTextNode(fileName_);
>
soapElement.addChildElement(soapEnvelope.createName(Definition.USE_COMPR
ESSION)).addTextNode("0");
>
soapElement.addChildElement(soapEnvelope.createName(Definition.SIZE)).ad
dTextNode(strSize);
>
> SOAPElement soapElementCreated =
soapElement.addChildElement(Definition.CREATED);
> soapElement.addNamespaceDeclaration("A",
"http://www.w3.org/2001/XMLSchema-instance");
> Name xsiType = soapEnvelope.createName("type", "A",
"http://www.w3.org/2001/XMLSchema-instance");
> soapElementCreated.addAttribute(xsiType, "DateTime");
> soapElementCreated.addTextNode(strDate);
>
> SOAPElement soapElementModified =
soapElement.addChildElement(Definition.MODIFIED);
> soapElement.addNamespaceDeclaration("B",
"http://www.w3.org/2001/XMLSchema-instance");
> Name xsiType1 = soapEnvelope.createName("type1", "B",
"http://www.w3.org/2001/XMLSchema-instance");
> soapElementModified.addAttribute(xsiType1, "DateTime");
> soapElementModified.addTextNode(strDate);
>
> SOAPElement soapElementAccessed =
soapElement.addChildElement(Definition.ACCESSED);
> soapElement.addNamespaceDeclaration("C",
"http://www.w3.org/2001/XMLSchema-instance");
> Name xsiType2 = soapEnvelope.createName("type2", "C",
"http://www.w3.org/2001/XMLSchema-instance");
> soapElementAccessed.addAttribute(xsiType2, "DateTime");
> soapElementAccessed.addTextNode(strDate);
>
> Scott Nichol wrote:Actually, the code
you included looks more like a client proxy than a
> service. Also, what code generates the request that you show? I don't
> see how Apache SOAP would generate that message.
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Scott Nichol"
> To:
> Sent: Tuesday, December 17, 2002 7:59 PM
> Subject: Re: Using DateTime object
>
>
> > Honestly, the WSDL is what I would need. I don't have time to create
> a
> > .NET service based on your code and look at the WSDL myself.
> >
> > Scott Nichol
> >
> > ----- Original Message -----
> > From: "Siddhartha Mehta"
> > To:
> > Sent: Tuesday, December 17, 2002 7:43 PM
> > Subject: Re: Using DateTime object
> >
> >
> > >
> > > Here is my C# webservice:
> > >
> > >
> >
>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://stora
> > gepoint.net/soap/UploadStart",
> > RequestNamespace="http://storagepoint.net/soap/",
> > ResponseNamespace="http://storagepoint.net/soap/",
> > Use=System.Web.Services.Description.SoapBindingUse.Literal,
> >
>
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)
> > ]
> > >
> > > public bool UploadStart(string SessionKey, long FolderId, string
> > FileName, System.SByte bUseCompression, long UncompressedSize,
> > System.DateTime Created, System.DateTime Modified, System.DateTime
> > Accessed, ref string StreamToken) {
> > >
> > > object[] results = this.Invoke("UploadStart", new object[] {
> > >
> > > SessionKey,
> > >
> > > FolderId,
> > >
> > > FileName,
> > >
> > > bUseCompression,
> > >
> > > UncompressedSize,
> > >
> > > Created,
> > >
> > > Modified,
> > >
> > > Accessed,
> > >
> > > StreamToken});
> > >
> > > StreamToken = ((string)(results[1]));
> > >
> > > return ((bool)(results[0]));
> > >
> > > }
> > >
> > >
> > > And the SOAP message that is sent is:
> > >
> > >
> > >
> > > >
> xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">> der/>
> > >
> > > > xmlns:A="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:B="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:C="http://www.w3.org/2001/XMLSchema-instance">
> > >
> > > 5617F6B2-AEAB-45CF-80C2-ED0379109DD9
> > >
> > > 8
> > >
> > > run.cmd
> > >
> > > 0
> > >
> > > 695
> > >
> > > 12/17/2002 4:39:40 PM
> > >
> > > 12/17/2002 4:39:40 PM
> > >
> > > 12/17/2002 4:39:40 PM
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > And the error I get is:
> > >
> > >
> > > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> > >
> > >
> > > soap:Client
> > > Server was unable to read request. --> There
> is
> > an error i
> > > n XML document (2, 565). --> String was not recognized as a valid
> > DateTime.> > faultstring>
> > >
> > >
> > >
> > >
> > >
> > > The strange thing here is, the error message says that the error
is
> at
> > column 565 which is surprisingly time. Does this mean that
> > the time is in correct format?
> > >
> > > Thanks!!
> > >
> > > Scott Nichol wrote:Can you post the
> > WSDL for the C# web service?
> > >
> > > Scott Nichol
> > >
> > > ----- Original Message -----
> > > From: "Siddhartha Mehta"
> > > To:
> > > Sent: Tuesday, December 17, 2002 6:55 PM
> > > Subject: Using DateTime object
> > >
> > >
> > > >
> > > > I am using C# webservice and a Java client. One of the functions
> in
> > my
> > > webservice expects a DateTime (C# object). How would I send a
> datetime
> > > object from my Java client code? Can anyone help me.
> > > >
> > > > Thanks,
> > > >
> > > > Siddhartha
> > > >
> > > >
> > > >
> > > > ---------------------------------
> > > > Do you Yahoo!?
> > > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > For additional commands, e-mail:
> > >
> > >
> > >
> > > ---------------------------------
> > > Do you Yahoo!?
> > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> >
> >
> > --
> > To unsubscribe, e-mail:
>
> > For additional commands, e-mail:
>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

Re: Using DateTime object

Posted by Scott Nichol <sn...@scottnichol.com>.
OK, a few things.

1. This list is just for Apache SOAP.

2. You still have not given the WSDL.  It's what you'll get back if you
point your browser to your service with a query string of ?wsdl, e.g. a
URL like http://storagepoint.net/soap/service.asmx?wsdl.

3. If Microsoft maps a .NET DateTime to xsd:dateTime, I would try a Java
java.util.Date, which I would guess JAXP would map to xsd:dateTime.  In
any case, since the parameters are using literal style, you should not
be specifying any xsi:type attribute: just get rid of that code.

Scott Nichol

----- Original Message -----
From: "Siddhartha Mehta" <si...@yahoo.com>
To: <so...@xml.apache.org>
Sent: Tuesday, December 17, 2002 8:07 PM
Subject: Re: Using DateTime object


>
> Oh.. I pasted the wrong code. Here is my function in C# I am trying to
access:
>
> [WebMethod(Description = "Start uploading a file.")]
>
> public bool UploadStart(string SessionKey,
>
> long FolderId,
>
> string FileName,
>
> sbyte bUseCompression,
>
> long UncompressedSize,
>
> System.DateTime Created,
>
> System.DateTime Modified,
>
> System.DateTime Accessed,
>
> ref string StreamToken)
>
>
> Next, I am not using APACHE. I am using JAXP (sun's Java XML Pack).
The code that generates the request is:
>
> SOAPMessage message = GetSOAPMessage();
> MimeHeaders headers = GetMimeHeaders(message);
> SOAPPart soapPart = GetSOAPPart(message);
> SOAPEnvelope soapEnvelope = GetSOAPEnvelope(soapPart);
> SOAPBody soapBody = GetSOAPBody(soapEnvelope);
>
> headers.setHeader(Definition.SOAP_ACTION,
Definition.URL_UPLOAD_START);
> Name bodyName =
soapEnvelope.createName(Definition.FUNCTION_UPLOAD_START, "",
"http://storagepoint.net/soap/");
> SOAPElement soapElement = soapBody.addBodyElement(bodyName);
>
soapElement.addChildElement(soapEnvelope.createName(Definition.SESSION_K
EY)).addTextNode(sessionKey);
>
soapElement.addChildElement(soapEnvelope.createName(Definition.FOLDER_ID
)).addTextNode(strFolderId);
>
soapElement.addChildElement(soapEnvelope.createName(Definition.FILE_NAME
)).addTextNode(fileName_);
>
soapElement.addChildElement(soapEnvelope.createName(Definition.USE_COMPR
ESSION)).addTextNode("0");
>
soapElement.addChildElement(soapEnvelope.createName(Definition.SIZE)).ad
dTextNode(strSize);
>
> SOAPElement soapElementCreated =
soapElement.addChildElement(Definition.CREATED);
> soapElement.addNamespaceDeclaration("A",
"http://www.w3.org/2001/XMLSchema-instance");
> Name xsiType = soapEnvelope.createName("type", "A",
"http://www.w3.org/2001/XMLSchema-instance");
> soapElementCreated.addAttribute(xsiType, "DateTime");
> soapElementCreated.addTextNode(strDate);
>
> SOAPElement soapElementModified =
soapElement.addChildElement(Definition.MODIFIED);
> soapElement.addNamespaceDeclaration("B",
"http://www.w3.org/2001/XMLSchema-instance");
> Name xsiType1 = soapEnvelope.createName("type1", "B",
"http://www.w3.org/2001/XMLSchema-instance");
> soapElementModified.addAttribute(xsiType1, "DateTime");
> soapElementModified.addTextNode(strDate);
>
> SOAPElement soapElementAccessed =
soapElement.addChildElement(Definition.ACCESSED);
> soapElement.addNamespaceDeclaration("C",
"http://www.w3.org/2001/XMLSchema-instance");
> Name xsiType2 = soapEnvelope.createName("type2", "C",
"http://www.w3.org/2001/XMLSchema-instance");
> soapElementAccessed.addAttribute(xsiType2, "DateTime");
> soapElementAccessed.addTextNode(strDate);
>
> Scott Nichol <sn...@scottnichol.com> wrote:Actually, the code
you included looks more like a client proxy than a
> service. Also, what code generates the request that you show? I don't
> see how Apache SOAP would generate that message.
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Scott Nichol"
> To:
> Sent: Tuesday, December 17, 2002 7:59 PM
> Subject: Re: Using DateTime object
>
>
> > Honestly, the WSDL is what I would need. I don't have time to create
> a
> > .NET service based on your code and look at the WSDL myself.
> >
> > Scott Nichol
> >
> > ----- Original Message -----
> > From: "Siddhartha Mehta"
> > To:
> > Sent: Tuesday, December 17, 2002 7:43 PM
> > Subject: Re: Using DateTime object
> >
> >
> > >
> > > Here is my C# webservice:
> > >
> > >
> >
>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://stora
> > gepoint.net/soap/UploadStart",
> > RequestNamespace="http://storagepoint.net/soap/",
> > ResponseNamespace="http://storagepoint.net/soap/",
> > Use=System.Web.Services.Description.SoapBindingUse.Literal,
> >
>
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)
> > ]
> > >
> > > public bool UploadStart(string SessionKey, long FolderId, string
> > FileName, System.SByte bUseCompression, long UncompressedSize,
> > System.DateTime Created, System.DateTime Modified, System.DateTime
> > Accessed, ref string StreamToken) {
> > >
> > > object[] results = this.Invoke("UploadStart", new object[] {
> > >
> > > SessionKey,
> > >
> > > FolderId,
> > >
> > > FileName,
> > >
> > > bUseCompression,
> > >
> > > UncompressedSize,
> > >
> > > Created,
> > >
> > > Modified,
> > >
> > > Accessed,
> > >
> > > StreamToken});
> > >
> > > StreamToken = ((string)(results[1]));
> > >
> > > return ((bool)(results[0]));
> > >
> > > }
> > >
> > >
> > > And the SOAP message that is sent is:
> > >
> > >
> > >
> > > >
> xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">> der/>
> > >
> > > > xmlns:A="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:B="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:C="http://www.w3.org/2001/XMLSchema-instance">
> > >
> > > 5617F6B2-AEAB-45CF-80C2-ED0379109DD9
> > >
> > > 8
> > >
> > > run.cmd
> > >
> > > 0
> > >
> > > 695
> > >
> > > 12/17/2002 4:39:40 PM
> > >
> > > 12/17/2002 4:39:40 PM
> > >
> > > 12/17/2002 4:39:40 PM
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > And the error I get is:
> > >
> > >
> > > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> > >
> > >
> > > soap:Client
> > > Server was unable to read request. --> There
> is
> > an error i
> > > n XML document (2, 565). --> String was not recognized as a valid
> > DateTime.> > faultstring>
> > >
> > >
> > >
> > >
> > >
> > > The strange thing here is, the error message says that the error
is
> at
> > column 565 which is surprisingly time. Does this mean that
> > the time is in correct format?
> > >
> > > Thanks!!
> > >
> > > Scott Nichol wrote:Can you post the
> > WSDL for the C# web service?
> > >
> > > Scott Nichol
> > >
> > > ----- Original Message -----
> > > From: "Siddhartha Mehta"
> > > To:
> > > Sent: Tuesday, December 17, 2002 6:55 PM
> > > Subject: Using DateTime object
> > >
> > >
> > > >
> > > > I am using C# webservice and a Java client. One of the functions
> in
> > my
> > > webservice expects a DateTime (C# object). How would I send a
> datetime
> > > object from my Java client code? Can anyone help me.
> > > >
> > > > Thanks,
> > > >
> > > > Siddhartha
> > > >
> > > >
> > > >
> > > > ---------------------------------
> > > > Do you Yahoo!?
> > > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > For additional commands, e-mail:
> > >
> > >
> > >
> > > ---------------------------------
> > > Do you Yahoo!?
> > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> >
> >
> > --
> > To unsubscribe, e-mail:
>
> > For additional commands, e-mail:
>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now


Re: Using DateTime object

Posted by Scott Nichol <sn...@scottnichol.com>.
OK, a few things.

1. This list is just for Apache SOAP.

2. You still have not given the WSDL.  It's what you'll get back if you
point your browser to your service with a query string of ?wsdl, e.g. a
URL like http://storagepoint.net/soap/service.asmx?wsdl.

3. If Microsoft maps a .NET DateTime to xsd:dateTime, I would try a Java
java.util.Date, which I would guess JAXP would map to xsd:dateTime.  In
any case, since the parameters are using literal style, you should not
be specifying any xsi:type attribute: just get rid of that code.

Scott Nichol

----- Original Message -----
From: "Siddhartha Mehta" <si...@yahoo.com>
To: <so...@xml.apache.org>
Sent: Tuesday, December 17, 2002 8:07 PM
Subject: Re: Using DateTime object


>
> Oh.. I pasted the wrong code. Here is my function in C# I am trying to
access:
>
> [WebMethod(Description = "Start uploading a file.")]
>
> public bool UploadStart(string SessionKey,
>
> long FolderId,
>
> string FileName,
>
> sbyte bUseCompression,
>
> long UncompressedSize,
>
> System.DateTime Created,
>
> System.DateTime Modified,
>
> System.DateTime Accessed,
>
> ref string StreamToken)
>
>
> Next, I am not using APACHE. I am using JAXP (sun's Java XML Pack).
The code that generates the request is:
>
> SOAPMessage message = GetSOAPMessage();
> MimeHeaders headers = GetMimeHeaders(message);
> SOAPPart soapPart = GetSOAPPart(message);
> SOAPEnvelope soapEnvelope = GetSOAPEnvelope(soapPart);
> SOAPBody soapBody = GetSOAPBody(soapEnvelope);
>
> headers.setHeader(Definition.SOAP_ACTION,
Definition.URL_UPLOAD_START);
> Name bodyName =
soapEnvelope.createName(Definition.FUNCTION_UPLOAD_START, "",
"http://storagepoint.net/soap/");
> SOAPElement soapElement = soapBody.addBodyElement(bodyName);
>
soapElement.addChildElement(soapEnvelope.createName(Definition.SESSION_K
EY)).addTextNode(sessionKey);
>
soapElement.addChildElement(soapEnvelope.createName(Definition.FOLDER_ID
)).addTextNode(strFolderId);
>
soapElement.addChildElement(soapEnvelope.createName(Definition.FILE_NAME
)).addTextNode(fileName_);
>
soapElement.addChildElement(soapEnvelope.createName(Definition.USE_COMPR
ESSION)).addTextNode("0");
>
soapElement.addChildElement(soapEnvelope.createName(Definition.SIZE)).ad
dTextNode(strSize);
>
> SOAPElement soapElementCreated =
soapElement.addChildElement(Definition.CREATED);
> soapElement.addNamespaceDeclaration("A",
"http://www.w3.org/2001/XMLSchema-instance");
> Name xsiType = soapEnvelope.createName("type", "A",
"http://www.w3.org/2001/XMLSchema-instance");
> soapElementCreated.addAttribute(xsiType, "DateTime");
> soapElementCreated.addTextNode(strDate);
>
> SOAPElement soapElementModified =
soapElement.addChildElement(Definition.MODIFIED);
> soapElement.addNamespaceDeclaration("B",
"http://www.w3.org/2001/XMLSchema-instance");
> Name xsiType1 = soapEnvelope.createName("type1", "B",
"http://www.w3.org/2001/XMLSchema-instance");
> soapElementModified.addAttribute(xsiType1, "DateTime");
> soapElementModified.addTextNode(strDate);
>
> SOAPElement soapElementAccessed =
soapElement.addChildElement(Definition.ACCESSED);
> soapElement.addNamespaceDeclaration("C",
"http://www.w3.org/2001/XMLSchema-instance");
> Name xsiType2 = soapEnvelope.createName("type2", "C",
"http://www.w3.org/2001/XMLSchema-instance");
> soapElementAccessed.addAttribute(xsiType2, "DateTime");
> soapElementAccessed.addTextNode(strDate);
>
> Scott Nichol <sn...@scottnichol.com> wrote:Actually, the code
you included looks more like a client proxy than a
> service. Also, what code generates the request that you show? I don't
> see how Apache SOAP would generate that message.
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Scott Nichol"
> To:
> Sent: Tuesday, December 17, 2002 7:59 PM
> Subject: Re: Using DateTime object
>
>
> > Honestly, the WSDL is what I would need. I don't have time to create
> a
> > .NET service based on your code and look at the WSDL myself.
> >
> > Scott Nichol
> >
> > ----- Original Message -----
> > From: "Siddhartha Mehta"
> > To:
> > Sent: Tuesday, December 17, 2002 7:43 PM
> > Subject: Re: Using DateTime object
> >
> >
> > >
> > > Here is my C# webservice:
> > >
> > >
> >
>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://stora
> > gepoint.net/soap/UploadStart",
> > RequestNamespace="http://storagepoint.net/soap/",
> > ResponseNamespace="http://storagepoint.net/soap/",
> > Use=System.Web.Services.Description.SoapBindingUse.Literal,
> >
>
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)
> > ]
> > >
> > > public bool UploadStart(string SessionKey, long FolderId, string
> > FileName, System.SByte bUseCompression, long UncompressedSize,
> > System.DateTime Created, System.DateTime Modified, System.DateTime
> > Accessed, ref string StreamToken) {
> > >
> > > object[] results = this.Invoke("UploadStart", new object[] {
> > >
> > > SessionKey,
> > >
> > > FolderId,
> > >
> > > FileName,
> > >
> > > bUseCompression,
> > >
> > > UncompressedSize,
> > >
> > > Created,
> > >
> > > Modified,
> > >
> > > Accessed,
> > >
> > > StreamToken});
> > >
> > > StreamToken = ((string)(results[1]));
> > >
> > > return ((bool)(results[0]));
> > >
> > > }
> > >
> > >
> > > And the SOAP message that is sent is:
> > >
> > >
> > >
> > > >
> xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">> der/>
> > >
> > > > xmlns:A="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:B="http://www.w3.org/2001/XMLSchema-instance"
> > xmlns:C="http://www.w3.org/2001/XMLSchema-instance">
> > >
> > > 5617F6B2-AEAB-45CF-80C2-ED0379109DD9
> > >
> > > 8
> > >
> > > run.cmd
> > >
> > > 0
> > >
> > > 695
> > >
> > > 12/17/2002 4:39:40 PM
> > >
> > > 12/17/2002 4:39:40 PM
> > >
> > > 12/17/2002 4:39:40 PM
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > >
> > > And the error I get is:
> > >
> > >
> > > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> > >
> > >
> > > soap:Client
> > > Server was unable to read request. --> There
> is
> > an error i
> > > n XML document (2, 565). --> String was not recognized as a valid
> > DateTime.> > faultstring>
> > >
> > >
> > >
> > >
> > >
> > > The strange thing here is, the error message says that the error
is
> at
> > column 565 which is surprisingly time. Does this mean that
> > the time is in correct format?
> > >
> > > Thanks!!
> > >
> > > Scott Nichol wrote:Can you post the
> > WSDL for the C# web service?
> > >
> > > Scott Nichol
> > >
> > > ----- Original Message -----
> > > From: "Siddhartha Mehta"
> > > To:
> > > Sent: Tuesday, December 17, 2002 6:55 PM
> > > Subject: Using DateTime object
> > >
> > >
> > > >
> > > > I am using C# webservice and a Java client. One of the functions
> in
> > my
> > > webservice expects a DateTime (C# object). How would I send a
> datetime
> > > object from my Java client code? Can anyone help me.
> > > >
> > > > Thanks,
> > > >
> > > > Siddhartha
> > > >
> > > >
> > > >
> > > > ---------------------------------
> > > > Do you Yahoo!?
> > > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > > For additional commands, e-mail:
> > >
> > >
> > >
> > > ---------------------------------
> > > Do you Yahoo!?
> > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> >
> >
> > --
> > To unsubscribe, e-mail:
>
> > For additional commands, e-mail:
>
> >
> >
>
>
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now


Re: Using DateTime object

Posted by Siddhartha Mehta <si...@yahoo.com>.
Oh.. I pasted the wrong code. Here is my function in C# I am trying to access:

[WebMethod(Description = "Start uploading a file.")]

public bool UploadStart(string SessionKey,

long FolderId, 

string FileName, 

sbyte bUseCompression, 

long UncompressedSize, 

System.DateTime Created, 

System.DateTime Modified, 

System.DateTime Accessed, 

ref string StreamToken)

 
Next, I am not using APACHE. I am using JAXP (sun's Java XML Pack). The code that generates the request is:
 
SOAPMessage message = GetSOAPMessage();
MimeHeaders headers = GetMimeHeaders(message);
SOAPPart soapPart = GetSOAPPart(message);
SOAPEnvelope soapEnvelope = GetSOAPEnvelope(soapPart);
SOAPBody soapBody = GetSOAPBody(soapEnvelope);
 
headers.setHeader(Definition.SOAP_ACTION, Definition.URL_UPLOAD_START);
Name bodyName = soapEnvelope.createName(Definition.FUNCTION_UPLOAD_START, "", "http://storagepoint.net/soap/");
SOAPElement soapElement = soapBody.addBodyElement(bodyName);
soapElement.addChildElement(soapEnvelope.createName(Definition.SESSION_KEY)).addTextNode(sessionKey);
soapElement.addChildElement(soapEnvelope.createName(Definition.FOLDER_ID)).addTextNode(strFolderId);
soapElement.addChildElement(soapEnvelope.createName(Definition.FILE_NAME)).addTextNode(fileName_);
soapElement.addChildElement(soapEnvelope.createName(Definition.USE_COMPRESSION)).addTextNode("0");
soapElement.addChildElement(soapEnvelope.createName(Definition.SIZE)).addTextNode(strSize);
         
SOAPElement soapElementCreated = soapElement.addChildElement(Definition.CREATED);
soapElement.addNamespaceDeclaration("A", "http://www.w3.org/2001/XMLSchema-instance");
Name xsiType = soapEnvelope.createName("type", "A", "http://www.w3.org/2001/XMLSchema-instance");
soapElementCreated.addAttribute(xsiType, "DateTime");
soapElementCreated.addTextNode(strDate);
         
SOAPElement soapElementModified = soapElement.addChildElement(Definition.MODIFIED);
soapElement.addNamespaceDeclaration("B", "http://www.w3.org/2001/XMLSchema-instance");
Name xsiType1 = soapEnvelope.createName("type1", "B", "http://www.w3.org/2001/XMLSchema-instance");
soapElementModified.addAttribute(xsiType1, "DateTime");
soapElementModified.addTextNode(strDate);
         
SOAPElement soapElementAccessed = soapElement.addChildElement(Definition.ACCESSED);
soapElement.addNamespaceDeclaration("C", "http://www.w3.org/2001/XMLSchema-instance");
Name xsiType2 = soapEnvelope.createName("type2", "C", "http://www.w3.org/2001/XMLSchema-instance");
soapElementAccessed.addAttribute(xsiType2, "DateTime");
soapElementAccessed.addTextNode(strDate);
 
Scott Nichol <sn...@scottnichol.com> wrote:Actually, the code you included looks more like a client proxy than a
service. Also, what code generates the request that you show? I don't
see how Apache SOAP would generate that message.

Scott Nichol

----- Original Message -----
From: "Scott Nichol" 
To: 
Sent: Tuesday, December 17, 2002 7:59 PM
Subject: Re: Using DateTime object


> Honestly, the WSDL is what I would need. I don't have time to create
a
> .NET service based on your code and look at the WSDL myself.
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Siddhartha Mehta" 
> To: 
> Sent: Tuesday, December 17, 2002 7:43 PM
> Subject: Re: Using DateTime object
>
>
> >
> > Here is my C# webservice:
> >
> >
>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://stora
> gepoint.net/soap/UploadStart",
> RequestNamespace="http://storagepoint.net/soap/",
> ResponseNamespace="http://storagepoint.net/soap/",
> Use=System.Web.Services.Description.SoapBindingUse.Literal,
>
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)
> ]
> >
> > public bool UploadStart(string SessionKey, long FolderId, string
> FileName, System.SByte bUseCompression, long UncompressedSize,
> System.DateTime Created, System.DateTime Modified, System.DateTime
> Accessed, ref string StreamToken) {
> >
> > object[] results = this.Invoke("UploadStart", new object[] {
> >
> > SessionKey,
> >
> > FolderId,
> >
> > FileName,
> >
> > bUseCompression,
> >
> > UncompressedSize,
> >
> > Created,
> >
> > Modified,
> >
> > Accessed,
> >
> > StreamToken});
> >
> > StreamToken = ((string)(results[1]));
> >
> > return ((bool)(results[0]));
> >
> > }
> >
> >
> > And the SOAP message that is sent is:
> >
> > 
> >
> > >
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">> der/>
> >
> > > xmlns:A="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:B="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:C="http://www.w3.org/2001/XMLSchema-instance">
> >
> > 5617F6B2-AEAB-45CF-80C2-ED0379109DD9
> >
> > 8
> >
> > run.cmd
> >
> > 0
> >
> > 695
> >
> > 12/17/2002 4:39:40 PM
> >
> > 12/17/2002 4:39:40 PM
> >
> > 12/17/2002 4:39:40 PM
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> >
> >
> > And the error I get is:
> >
> > 
> > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> > 
> > 
> > soap:Client
> > Server was unable to read request. --> There
is
> an error i
> > n XML document (2, 565). --> String was not recognized as a valid
> DateTime.> > faultstring>
> > 
> > 
> > 
> > 
> >
> > The strange thing here is, the error message says that the error is
at
> column 565 which is surprisingly time. Does this mean that
> the time is in correct format?
> >
> > Thanks!!
> >
> > Scott Nichol wrote:Can you post the
> WSDL for the C# web service?
> >
> > Scott Nichol
> >
> > ----- Original Message -----
> > From: "Siddhartha Mehta"
> > To:
> > Sent: Tuesday, December 17, 2002 6:55 PM
> > Subject: Using DateTime object
> >
> >
> > >
> > > I am using C# webservice and a Java client. One of the functions
in
> my
> > webservice expects a DateTime (C# object). How would I send a
datetime
> > object from my Java client code? Can anyone help me.
> > >
> > > Thanks,
> > >
> > > Siddhartha
> > >
> > >
> > >
> > > ---------------------------------
> > > Do you Yahoo!?
> > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> >
> >
> > --
> > To unsubscribe, e-mail:
> > For additional commands, e-mail:
> >
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

Re: Using DateTime object

Posted by Siddhartha Mehta <si...@yahoo.com>.
Oh.. I pasted the wrong code. Here is my function in C# I am trying to access:

[WebMethod(Description = "Start uploading a file.")]

public bool UploadStart(string SessionKey,

long FolderId, 

string FileName, 

sbyte bUseCompression, 

long UncompressedSize, 

System.DateTime Created, 

System.DateTime Modified, 

System.DateTime Accessed, 

ref string StreamToken)

 
Next, I am not using APACHE. I am using JAXP (sun's Java XML Pack). The code that generates the request is:
 
SOAPMessage message = GetSOAPMessage();
MimeHeaders headers = GetMimeHeaders(message);
SOAPPart soapPart = GetSOAPPart(message);
SOAPEnvelope soapEnvelope = GetSOAPEnvelope(soapPart);
SOAPBody soapBody = GetSOAPBody(soapEnvelope);
 
headers.setHeader(Definition.SOAP_ACTION, Definition.URL_UPLOAD_START);
Name bodyName = soapEnvelope.createName(Definition.FUNCTION_UPLOAD_START, "", "http://storagepoint.net/soap/");
SOAPElement soapElement = soapBody.addBodyElement(bodyName);
soapElement.addChildElement(soapEnvelope.createName(Definition.SESSION_KEY)).addTextNode(sessionKey);
soapElement.addChildElement(soapEnvelope.createName(Definition.FOLDER_ID)).addTextNode(strFolderId);
soapElement.addChildElement(soapEnvelope.createName(Definition.FILE_NAME)).addTextNode(fileName_);
soapElement.addChildElement(soapEnvelope.createName(Definition.USE_COMPRESSION)).addTextNode("0");
soapElement.addChildElement(soapEnvelope.createName(Definition.SIZE)).addTextNode(strSize);
         
SOAPElement soapElementCreated = soapElement.addChildElement(Definition.CREATED);
soapElement.addNamespaceDeclaration("A", "http://www.w3.org/2001/XMLSchema-instance");
Name xsiType = soapEnvelope.createName("type", "A", "http://www.w3.org/2001/XMLSchema-instance");
soapElementCreated.addAttribute(xsiType, "DateTime");
soapElementCreated.addTextNode(strDate);
         
SOAPElement soapElementModified = soapElement.addChildElement(Definition.MODIFIED);
soapElement.addNamespaceDeclaration("B", "http://www.w3.org/2001/XMLSchema-instance");
Name xsiType1 = soapEnvelope.createName("type1", "B", "http://www.w3.org/2001/XMLSchema-instance");
soapElementModified.addAttribute(xsiType1, "DateTime");
soapElementModified.addTextNode(strDate);
         
SOAPElement soapElementAccessed = soapElement.addChildElement(Definition.ACCESSED);
soapElement.addNamespaceDeclaration("C", "http://www.w3.org/2001/XMLSchema-instance");
Name xsiType2 = soapEnvelope.createName("type2", "C", "http://www.w3.org/2001/XMLSchema-instance");
soapElementAccessed.addAttribute(xsiType2, "DateTime");
soapElementAccessed.addTextNode(strDate);
 
Scott Nichol <sn...@scottnichol.com> wrote:Actually, the code you included looks more like a client proxy than a
service. Also, what code generates the request that you show? I don't
see how Apache SOAP would generate that message.

Scott Nichol

----- Original Message -----
From: "Scott Nichol" 
To: 
Sent: Tuesday, December 17, 2002 7:59 PM
Subject: Re: Using DateTime object


> Honestly, the WSDL is what I would need. I don't have time to create
a
> .NET service based on your code and look at the WSDL myself.
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Siddhartha Mehta" 
> To: 
> Sent: Tuesday, December 17, 2002 7:43 PM
> Subject: Re: Using DateTime object
>
>
> >
> > Here is my C# webservice:
> >
> >
>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://stora
> gepoint.net/soap/UploadStart",
> RequestNamespace="http://storagepoint.net/soap/",
> ResponseNamespace="http://storagepoint.net/soap/",
> Use=System.Web.Services.Description.SoapBindingUse.Literal,
>
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)
> ]
> >
> > public bool UploadStart(string SessionKey, long FolderId, string
> FileName, System.SByte bUseCompression, long UncompressedSize,
> System.DateTime Created, System.DateTime Modified, System.DateTime
> Accessed, ref string StreamToken) {
> >
> > object[] results = this.Invoke("UploadStart", new object[] {
> >
> > SessionKey,
> >
> > FolderId,
> >
> > FileName,
> >
> > bUseCompression,
> >
> > UncompressedSize,
> >
> > Created,
> >
> > Modified,
> >
> > Accessed,
> >
> > StreamToken});
> >
> > StreamToken = ((string)(results[1]));
> >
> > return ((bool)(results[0]));
> >
> > }
> >
> >
> > And the SOAP message that is sent is:
> >
> > 
> >
> > >
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">> der/>
> >
> > > xmlns:A="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:B="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:C="http://www.w3.org/2001/XMLSchema-instance">
> >
> > 5617F6B2-AEAB-45CF-80C2-ED0379109DD9
> >
> > 8
> >
> > run.cmd
> >
> > 0
> >
> > 695
> >
> > 12/17/2002 4:39:40 PM
> >
> > 12/17/2002 4:39:40 PM
> >
> > 12/17/2002 4:39:40 PM
> >
> > 
> >
> > 
> >
> > 
> >
> > 
> >
> >
> >
> > And the error I get is:
> >
> > 
> > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> > 
> > 
> > soap:Client
> > Server was unable to read request. --> There
is
> an error i
> > n XML document (2, 565). --> String was not recognized as a valid
> DateTime.> > faultstring>
> > 
> > 
> > 
> > 
> >
> > The strange thing here is, the error message says that the error is
at
> column 565 which is surprisingly time. Does this mean that
> the time is in correct format?
> >
> > Thanks!!
> >
> > Scott Nichol wrote:Can you post the
> WSDL for the C# web service?
> >
> > Scott Nichol
> >
> > ----- Original Message -----
> > From: "Siddhartha Mehta"
> > To:
> > Sent: Tuesday, December 17, 2002 6:55 PM
> > Subject: Using DateTime object
> >
> >
> > >
> > > I am using C# webservice and a Java client. One of the functions
in
> my
> > webservice expects a DateTime (C# object). How would I send a
datetime
> > object from my Java client code? Can anyone help me.
> > >
> > > Thanks,
> > >
> > > Siddhartha
> > >
> > >
> > >
> > > ---------------------------------
> > > Do you Yahoo!?
> > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> >
> >
> > --
> > To unsubscribe, e-mail:
> > For additional commands, e-mail:
> >
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
>
>
> --
> To unsubscribe, e-mail:

> For additional commands, e-mail:

>
>


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

Re: Using DateTime object

Posted by Scott Nichol <sn...@scottnichol.com>.
Actually, the code you included looks more like a client proxy than a
service.  Also, what code generates the request that you show?  I don't
see how Apache SOAP would generate that message.

Scott Nichol

----- Original Message -----
From: "Scott Nichol" <sn...@scottnichol.com>
To: <so...@xml.apache.org>
Sent: Tuesday, December 17, 2002 7:59 PM
Subject: Re: Using DateTime object


> Honestly, the WSDL is what I would need.  I don't have time to create
a
> .NET service based on your code and look at the WSDL myself.
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Siddhartha Mehta" <si...@yahoo.com>
> To: <so...@xml.apache.org>
> Sent: Tuesday, December 17, 2002 7:43 PM
> Subject: Re: Using DateTime object
>
>
> >
> > Here is my C# webservice:
> >
> >
>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://stora
> gepoint.net/soap/UploadStart",
> RequestNamespace="http://storagepoint.net/soap/",
> ResponseNamespace="http://storagepoint.net/soap/",
> Use=System.Web.Services.Description.SoapBindingUse.Literal,
>
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)
> ]
> >
> > public bool UploadStart(string SessionKey, long FolderId, string
> FileName, System.SByte bUseCompression, long UncompressedSize,
> System.DateTime Created, System.DateTime Modified, System.DateTime
> Accessed, ref string StreamToken) {
> >
> > object[] results = this.Invoke("UploadStart", new object[] {
> >
> > SessionKey,
> >
> > FolderId,
> >
> > FileName,
> >
> > bUseCompression,
> >
> > UncompressedSize,
> >
> > Created,
> >
> > Modified,
> >
> > Accessed,
> >
> > StreamToken});
> >
> > StreamToken = ((string)(results[1]));
> >
> > return ((bool)(results[0]));
> >
> > }
> >
> >
> > And the SOAP message that is sent is:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> >
> > <soap-env:Envelope
>
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"><soap-env:Hea
> der/>
> >
> > <soap-env:Body><UploadStart xmlns="http://storagepoint.net/soap/"
> xmlns:A="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:B="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:C="http://www.w3.org/2001/XMLSchema-instance">
> >
> > <SessionKey>5617F6B2-AEAB-45CF-80C2-ED0379109DD9</SessionKey>
> >
> > <FolderId>8</FolderId>
> >
> > <FileName>run.cmd</FileName>
> >
> > <bUseCompression>0</bUseCompression>
> >
> > <UncompressedSize>695</UncompressedSize>
> >
> > <Created A:type="DateTime">12/17/2002 4:39:40 PM</Created>
> >
> > <Modified B:type1="DateTime">12/17/2002 4:39:40 PM</Modified>
> >
> > <Accessed C:type2="DateTime">12/17/2002 4:39:40 PM</Accessed>
> >
> > <StreamToken></StreamToken>
> >
> > </UploadStart>
> >
> > </soap-env:Body>
> >
> > </soap-env:Envelope>
> >
> >
> >
> > And the error I get is:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> >   <soap:Body>
> >     <soap:Fault>
> >       <faultcode>soap:Client</faultcode>
> >       <faultstring>Server was unable to read request. --&gt; There
is
> an error i
> > n XML document (2, 565). --&gt; String was not recognized as a valid
> DateTime.</
> > faultstring>
> >       <detail/>
> >     </soap:Fault>
> >   </soap:Body>
> > </soap:Envelope>
> >
> > The strange thing here is, the error message says that the error is
at
> column 565 which is surprisingly <Modified> time. Does this mean that
> the <Created> time is in correct format?
> >
> > Thanks!!
> >
> >  Scott Nichol <sn...@scottnichol.com> wrote:Can you post the
> WSDL for the C# web service?
> >
> > Scott Nichol
> >
> > ----- Original Message -----
> > From: "Siddhartha Mehta"
> > To:
> > Sent: Tuesday, December 17, 2002 6:55 PM
> > Subject: Using DateTime object
> >
> >
> > >
> > > I am using C# webservice and a Java client. One of the functions
in
> my
> > webservice expects a DateTime (C# object). How would I send a
datetime
> > object from my Java client code? Can anyone help me.
> > >
> > > Thanks,
> > >
> > > Siddhartha
> > >
> > >
> > >
> > > ---------------------------------
> > > Do you Yahoo!?
> > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> >
> >
> > --
> > To unsubscribe, e-mail:
> > For additional commands, e-mail:
> >
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
>
>
> --
> To unsubscribe, e-mail:
<ma...@xml.apache.org>
> For additional commands, e-mail:
<ma...@xml.apache.org>
>
>


Re: Using DateTime object

Posted by Scott Nichol <sn...@scottnichol.com>.
Actually, the code you included looks more like a client proxy than a
service.  Also, what code generates the request that you show?  I don't
see how Apache SOAP would generate that message.

Scott Nichol

----- Original Message -----
From: "Scott Nichol" <sn...@scottnichol.com>
To: <so...@xml.apache.org>
Sent: Tuesday, December 17, 2002 7:59 PM
Subject: Re: Using DateTime object


> Honestly, the WSDL is what I would need.  I don't have time to create
a
> .NET service based on your code and look at the WSDL myself.
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Siddhartha Mehta" <si...@yahoo.com>
> To: <so...@xml.apache.org>
> Sent: Tuesday, December 17, 2002 7:43 PM
> Subject: Re: Using DateTime object
>
>
> >
> > Here is my C# webservice:
> >
> >
>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://stora
> gepoint.net/soap/UploadStart",
> RequestNamespace="http://storagepoint.net/soap/",
> ResponseNamespace="http://storagepoint.net/soap/",
> Use=System.Web.Services.Description.SoapBindingUse.Literal,
>
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)
> ]
> >
> > public bool UploadStart(string SessionKey, long FolderId, string
> FileName, System.SByte bUseCompression, long UncompressedSize,
> System.DateTime Created, System.DateTime Modified, System.DateTime
> Accessed, ref string StreamToken) {
> >
> > object[] results = this.Invoke("UploadStart", new object[] {
> >
> > SessionKey,
> >
> > FolderId,
> >
> > FileName,
> >
> > bUseCompression,
> >
> > UncompressedSize,
> >
> > Created,
> >
> > Modified,
> >
> > Accessed,
> >
> > StreamToken});
> >
> > StreamToken = ((string)(results[1]));
> >
> > return ((bool)(results[0]));
> >
> > }
> >
> >
> > And the SOAP message that is sent is:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> >
> > <soap-env:Envelope
>
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"><soap-env:Hea
> der/>
> >
> > <soap-env:Body><UploadStart xmlns="http://storagepoint.net/soap/"
> xmlns:A="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:B="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:C="http://www.w3.org/2001/XMLSchema-instance">
> >
> > <SessionKey>5617F6B2-AEAB-45CF-80C2-ED0379109DD9</SessionKey>
> >
> > <FolderId>8</FolderId>
> >
> > <FileName>run.cmd</FileName>
> >
> > <bUseCompression>0</bUseCompression>
> >
> > <UncompressedSize>695</UncompressedSize>
> >
> > <Created A:type="DateTime">12/17/2002 4:39:40 PM</Created>
> >
> > <Modified B:type1="DateTime">12/17/2002 4:39:40 PM</Modified>
> >
> > <Accessed C:type2="DateTime">12/17/2002 4:39:40 PM</Accessed>
> >
> > <StreamToken></StreamToken>
> >
> > </UploadStart>
> >
> > </soap-env:Body>
> >
> > </soap-env:Envelope>
> >
> >
> >
> > And the error I get is:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
> >   <soap:Body>
> >     <soap:Fault>
> >       <faultcode>soap:Client</faultcode>
> >       <faultstring>Server was unable to read request. --&gt; There
is
> an error i
> > n XML document (2, 565). --&gt; String was not recognized as a valid
> DateTime.</
> > faultstring>
> >       <detail/>
> >     </soap:Fault>
> >   </soap:Body>
> > </soap:Envelope>
> >
> > The strange thing here is, the error message says that the error is
at
> column 565 which is surprisingly <Modified> time. Does this mean that
> the <Created> time is in correct format?
> >
> > Thanks!!
> >
> >  Scott Nichol <sn...@scottnichol.com> wrote:Can you post the
> WSDL for the C# web service?
> >
> > Scott Nichol
> >
> > ----- Original Message -----
> > From: "Siddhartha Mehta"
> > To:
> > Sent: Tuesday, December 17, 2002 6:55 PM
> > Subject: Using DateTime object
> >
> >
> > >
> > > I am using C# webservice and a Java client. One of the functions
in
> my
> > webservice expects a DateTime (C# object). How would I send a
datetime
> > object from my Java client code? Can anyone help me.
> > >
> > > Thanks,
> > >
> > > Siddhartha
> > >
> > >
> > >
> > > ---------------------------------
> > > Do you Yahoo!?
> > > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
> >
> >
> > --
> > To unsubscribe, e-mail:
> > For additional commands, e-mail:
> >
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
>
>
> --
> To unsubscribe, e-mail:
<ma...@xml.apache.org>
> For additional commands, e-mail:
<ma...@xml.apache.org>
>
>


Re: Using DateTime object

Posted by Siddhartha Mehta <si...@yahoo.com>.
I know this could be very simple, but what file would be the WSDL file. The way I have is a C# web service (i.e a asmx.cs file). I am using JAXP to talk to the SOAP server. So what would you want me to post?
 Scott Nichol <sn...@scottnichol.com> wrote:Honestly, the WSDL is what I would need. I don't have time to create a
.NET service based on your code and look at the WSDL myself.

Scott Nichol

----- Original Message -----
From: "Siddhartha Mehta" 
To: 
Sent: Tuesday, December 17, 2002 7:43 PM
Subject: Re: Using DateTime object


>
> Here is my C# webservice:
>
>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://stora
gepoint.net/soap/UploadStart",
RequestNamespace="http://storagepoint.net/soap/",
ResponseNamespace="http://storagepoint.net/soap/",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)
]
>
> public bool UploadStart(string SessionKey, long FolderId, string
FileName, System.SByte bUseCompression, long UncompressedSize,
System.DateTime Created, System.DateTime Modified, System.DateTime
Accessed, ref string StreamToken) {
>
> object[] results = this.Invoke("UploadStart", new object[] {
>
> SessionKey,
>
> FolderId,
>
> FileName,
>
> bUseCompression,
>
> UncompressedSize,
>
> Created,
>
> Modified,
>
> Accessed,
>
> StreamToken});
>
> StreamToken = ((string)(results[1]));
>
> return ((bool)(results[0]));
>
> }
>
>
> And the SOAP message that is sent is:
>
> 
>
> xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">der/>
>
> xmlns:A="http://www.w3.org/2001/XMLSchema-instance"
xmlns:B="http://www.w3.org/2001/XMLSchema-instance"
xmlns:C="http://www.w3.org/2001/XMLSchema-instance">
>
> 5617F6B2-AEAB-45CF-80C2-ED0379109DD9
>
> 8
>
> run.cmd
>
> 0
>
> 695
>
> 12/17/2002 4:39:40 PM
>
> 12/17/2002 4:39:40 PM
>
> 12/17/2002 4:39:40 PM
>
> 
>
> 
>
> 
>
> 
>
>
>
> And the error I get is:
>
> 
> 
> 
> 
> soap:Client
> Server was unable to read request. --> There is
an error i
> n XML document (2, 565). --> String was not recognized as a valid
DateTime.> faultstring>
> 
> 
> 
> 
>
> The strange thing here is, the error message says that the error is at
column 565 which is surprisingly time. Does this mean that
the time is in correct format?
>
> Thanks!!
>
> Scott Nichol wrote:Can you post the
WSDL for the C# web service?
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Siddhartha Mehta"
> To:
> Sent: Tuesday, December 17, 2002 6:55 PM
> Subject: Using DateTime object
>
>
> >
> > I am using C# webservice and a Java client. One of the functions in
my
> webservice expects a DateTime (C# object). How would I send a datetime
> object from my Java client code? Can anyone help me.
> >
> > Thanks,
> >
> > Siddhartha
> >
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
>
>
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

Re: Using DateTime object

Posted by Siddhartha Mehta <si...@yahoo.com>.
I know this could be very simple, but what file would be the WSDL file. The way I have is a C# web service (i.e a asmx.cs file). I am using JAXP to talk to the SOAP server. So what would you want me to post?
 Scott Nichol <sn...@scottnichol.com> wrote:Honestly, the WSDL is what I would need. I don't have time to create a
.NET service based on your code and look at the WSDL myself.

Scott Nichol

----- Original Message -----
From: "Siddhartha Mehta" 
To: 
Sent: Tuesday, December 17, 2002 7:43 PM
Subject: Re: Using DateTime object


>
> Here is my C# webservice:
>
>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://stora
gepoint.net/soap/UploadStart",
RequestNamespace="http://storagepoint.net/soap/",
ResponseNamespace="http://storagepoint.net/soap/",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)
]
>
> public bool UploadStart(string SessionKey, long FolderId, string
FileName, System.SByte bUseCompression, long UncompressedSize,
System.DateTime Created, System.DateTime Modified, System.DateTime
Accessed, ref string StreamToken) {
>
> object[] results = this.Invoke("UploadStart", new object[] {
>
> SessionKey,
>
> FolderId,
>
> FileName,
>
> bUseCompression,
>
> UncompressedSize,
>
> Created,
>
> Modified,
>
> Accessed,
>
> StreamToken});
>
> StreamToken = ((string)(results[1]));
>
> return ((bool)(results[0]));
>
> }
>
>
> And the SOAP message that is sent is:
>
> 
>
> xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/">der/>
>
> xmlns:A="http://www.w3.org/2001/XMLSchema-instance"
xmlns:B="http://www.w3.org/2001/XMLSchema-instance"
xmlns:C="http://www.w3.org/2001/XMLSchema-instance">
>
> 5617F6B2-AEAB-45CF-80C2-ED0379109DD9
>
> 8
>
> run.cmd
>
> 0
>
> 695
>
> 12/17/2002 4:39:40 PM
>
> 12/17/2002 4:39:40 PM
>
> 12/17/2002 4:39:40 PM
>
> 
>
> 
>
> 
>
> 
>
>
>
> And the error I get is:
>
> 
> 
> 
> 
> soap:Client
> Server was unable to read request. --> There is
an error i
> n XML document (2, 565). --> String was not recognized as a valid
DateTime.> faultstring>
> 
> 
> 
> 
>
> The strange thing here is, the error message says that the error is at
column 565 which is surprisingly time. Does this mean that
the time is in correct format?
>
> Thanks!!
>
> Scott Nichol wrote:Can you post the
WSDL for the C# web service?
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Siddhartha Mehta"
> To:
> Sent: Tuesday, December 17, 2002 6:55 PM
> Subject: Using DateTime object
>
>
> >
> > I am using C# webservice and a Java client. One of the functions in
my
> webservice expects a DateTime (C# object). How would I send a datetime
> object from my Java client code? Can anyone help me.
> >
> > Thanks,
> >
> > Siddhartha
> >
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
>
>
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

Re: Using DateTime object

Posted by Scott Nichol <sn...@scottnichol.com>.
Honestly, the WSDL is what I would need.  I don't have time to create a
.NET service based on your code and look at the WSDL myself.

Scott Nichol

----- Original Message -----
From: "Siddhartha Mehta" <si...@yahoo.com>
To: <so...@xml.apache.org>
Sent: Tuesday, December 17, 2002 7:43 PM
Subject: Re: Using DateTime object


>
> Here is my C# webservice:
>
>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://stora
gepoint.net/soap/UploadStart",
RequestNamespace="http://storagepoint.net/soap/",
ResponseNamespace="http://storagepoint.net/soap/",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)
]
>
> public bool UploadStart(string SessionKey, long FolderId, string
FileName, System.SByte bUseCompression, long UncompressedSize,
System.DateTime Created, System.DateTime Modified, System.DateTime
Accessed, ref string StreamToken) {
>
> object[] results = this.Invoke("UploadStart", new object[] {
>
> SessionKey,
>
> FolderId,
>
> FileName,
>
> bUseCompression,
>
> UncompressedSize,
>
> Created,
>
> Modified,
>
> Accessed,
>
> StreamToken});
>
> StreamToken = ((string)(results[1]));
>
> return ((bool)(results[0]));
>
> }
>
>
> And the SOAP message that is sent is:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <soap-env:Envelope
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"><soap-env:Hea
der/>
>
> <soap-env:Body><UploadStart xmlns="http://storagepoint.net/soap/"
xmlns:A="http://www.w3.org/2001/XMLSchema-instance"
xmlns:B="http://www.w3.org/2001/XMLSchema-instance"
xmlns:C="http://www.w3.org/2001/XMLSchema-instance">
>
> <SessionKey>5617F6B2-AEAB-45CF-80C2-ED0379109DD9</SessionKey>
>
> <FolderId>8</FolderId>
>
> <FileName>run.cmd</FileName>
>
> <bUseCompression>0</bUseCompression>
>
> <UncompressedSize>695</UncompressedSize>
>
> <Created A:type="DateTime">12/17/2002 4:39:40 PM</Created>
>
> <Modified B:type1="DateTime">12/17/2002 4:39:40 PM</Modified>
>
> <Accessed C:type2="DateTime">12/17/2002 4:39:40 PM</Accessed>
>
> <StreamToken></StreamToken>
>
> </UploadStart>
>
> </soap-env:Body>
>
> </soap-env:Envelope>
>
>
>
> And the error I get is:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>   <soap:Body>
>     <soap:Fault>
>       <faultcode>soap:Client</faultcode>
>       <faultstring>Server was unable to read request. --&gt; There is
an error i
> n XML document (2, 565). --&gt; String was not recognized as a valid
DateTime.</
> faultstring>
>       <detail/>
>     </soap:Fault>
>   </soap:Body>
> </soap:Envelope>
>
> The strange thing here is, the error message says that the error is at
column 565 which is surprisingly <Modified> time. Does this mean that
the <Created> time is in correct format?
>
> Thanks!!
>
>  Scott Nichol <sn...@scottnichol.com> wrote:Can you post the
WSDL for the C# web service?
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Siddhartha Mehta"
> To:
> Sent: Tuesday, December 17, 2002 6:55 PM
> Subject: Using DateTime object
>
>
> >
> > I am using C# webservice and a Java client. One of the functions in
my
> webservice expects a DateTime (C# object). How would I send a datetime
> object from my Java client code? Can anyone help me.
> >
> > Thanks,
> >
> > Siddhartha
> >
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
>
>
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now


Re: Using DateTime object

Posted by Scott Nichol <sn...@scottnichol.com>.
Honestly, the WSDL is what I would need.  I don't have time to create a
.NET service based on your code and look at the WSDL myself.

Scott Nichol

----- Original Message -----
From: "Siddhartha Mehta" <si...@yahoo.com>
To: <so...@xml.apache.org>
Sent: Tuesday, December 17, 2002 7:43 PM
Subject: Re: Using DateTime object


>
> Here is my C# webservice:
>
>
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://stora
gepoint.net/soap/UploadStart",
RequestNamespace="http://storagepoint.net/soap/",
ResponseNamespace="http://storagepoint.net/soap/",
Use=System.Web.Services.Description.SoapBindingUse.Literal,
ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)
]
>
> public bool UploadStart(string SessionKey, long FolderId, string
FileName, System.SByte bUseCompression, long UncompressedSize,
System.DateTime Created, System.DateTime Modified, System.DateTime
Accessed, ref string StreamToken) {
>
> object[] results = this.Invoke("UploadStart", new object[] {
>
> SessionKey,
>
> FolderId,
>
> FileName,
>
> bUseCompression,
>
> UncompressedSize,
>
> Created,
>
> Modified,
>
> Accessed,
>
> StreamToken});
>
> StreamToken = ((string)(results[1]));
>
> return ((bool)(results[0]));
>
> }
>
>
> And the SOAP message that is sent is:
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <soap-env:Envelope
xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"><soap-env:Hea
der/>
>
> <soap-env:Body><UploadStart xmlns="http://storagepoint.net/soap/"
xmlns:A="http://www.w3.org/2001/XMLSchema-instance"
xmlns:B="http://www.w3.org/2001/XMLSchema-instance"
xmlns:C="http://www.w3.org/2001/XMLSchema-instance">
>
> <SessionKey>5617F6B2-AEAB-45CF-80C2-ED0379109DD9</SessionKey>
>
> <FolderId>8</FolderId>
>
> <FileName>run.cmd</FileName>
>
> <bUseCompression>0</bUseCompression>
>
> <UncompressedSize>695</UncompressedSize>
>
> <Created A:type="DateTime">12/17/2002 4:39:40 PM</Created>
>
> <Modified B:type1="DateTime">12/17/2002 4:39:40 PM</Modified>
>
> <Accessed C:type2="DateTime">12/17/2002 4:39:40 PM</Accessed>
>
> <StreamToken></StreamToken>
>
> </UploadStart>
>
> </soap-env:Body>
>
> </soap-env:Envelope>
>
>
>
> And the error I get is:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>   <soap:Body>
>     <soap:Fault>
>       <faultcode>soap:Client</faultcode>
>       <faultstring>Server was unable to read request. --&gt; There is
an error i
> n XML document (2, 565). --&gt; String was not recognized as a valid
DateTime.</
> faultstring>
>       <detail/>
>     </soap:Fault>
>   </soap:Body>
> </soap:Envelope>
>
> The strange thing here is, the error message says that the error is at
column 565 which is surprisingly <Modified> time. Does this mean that
the <Created> time is in correct format?
>
> Thanks!!
>
>  Scott Nichol <sn...@scottnichol.com> wrote:Can you post the
WSDL for the C# web service?
>
> Scott Nichol
>
> ----- Original Message -----
> From: "Siddhartha Mehta"
> To:
> Sent: Tuesday, December 17, 2002 6:55 PM
> Subject: Using DateTime object
>
>
> >
> > I am using C# webservice and a Java client. One of the functions in
my
> webservice expects a DateTime (C# object). How would I send a datetime
> object from my Java client code? Can anyone help me.
> >
> > Thanks,
> >
> > Siddhartha
> >
> >
> >
> > ---------------------------------
> > Do you Yahoo!?
> > Yahoo! Mail Plus - Powerful. Affordable. Sign up now
>
>
> --
> To unsubscribe, e-mail:
> For additional commands, e-mail:
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now


Re: Using DateTime object

Posted by Siddhartha Mehta <si...@yahoo.com>.
Here is my C# webservice:

[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://storagepoint.net/soap/UploadStart", RequestNamespace="http://storagepoint.net/soap/", ResponseNamespace="http://storagepoint.net/soap/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]

public bool UploadStart(string SessionKey, long FolderId, string FileName, System.SByte bUseCompression, long UncompressedSize, System.DateTime Created, System.DateTime Modified, System.DateTime Accessed, ref string StreamToken) {

object[] results = this.Invoke("UploadStart", new object[] {

SessionKey,

FolderId,

FileName,

bUseCompression,

UncompressedSize,

Created,

Modified,

Accessed,

StreamToken});

StreamToken = ((string)(results[1]));

return ((bool)(results[0]));

}

 
And the SOAP message that is sent is:

<?xml version="1.0" encoding="UTF-8"?>

<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"><soap-env:Header/>

<soap-env:Body><UploadStart xmlns="http://storagepoint.net/soap/" xmlns:A="http://www.w3.org/2001/XMLSchema-instance" xmlns:B="http://www.w3.org/2001/XMLSchema-instance" xmlns:C="http://www.w3.org/2001/XMLSchema-instance">

<SessionKey>5617F6B2-AEAB-45CF-80C2-ED0379109DD9</SessionKey>

<FolderId>8</FolderId>

<FileName>run.cmd</FileName>

<bUseCompression>0</bUseCompression>

<UncompressedSize>695</UncompressedSize>

<Created A:type="DateTime">12/17/2002 4:39:40 PM</Created>

<Modified B:type1="DateTime">12/17/2002 4:39:40 PM</Modified>

<Accessed C:type2="DateTime">12/17/2002 4:39:40 PM</Accessed>

<StreamToken></StreamToken>

</UploadStart>

</soap-env:Body>

</soap-env:Envelope>

 

And the error I get is:

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <soap:Fault>
      <faultcode>soap:Client</faultcode>
      <faultstring>Server was unable to read request. --&gt; There is an error i
n XML document (2, 565). --&gt; String was not recognized as a valid DateTime.</
faultstring>
      <detail/>
    </soap:Fault>
  </soap:Body>
</soap:Envelope>

The strange thing here is, the error message says that the error is at column 565 which is surprisingly <Modified> time. Does this mean that the <Created> time is in correct format?

Thanks!!

 Scott Nichol <sn...@scottnichol.com> wrote:Can you post the WSDL for the C# web service?

Scott Nichol

----- Original Message -----
From: "Siddhartha Mehta" 
To: 
Sent: Tuesday, December 17, 2002 6:55 PM
Subject: Using DateTime object


>
> I am using C# webservice and a Java client. One of the functions in my
webservice expects a DateTime (C# object). How would I send a datetime
object from my Java client code? Can anyone help me.
>
> Thanks,
>
> Siddhartha
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

Re: Using DateTime object

Posted by Siddhartha Mehta <si...@yahoo.com>.
Here is my C# webservice:

[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://storagepoint.net/soap/UploadStart", RequestNamespace="http://storagepoint.net/soap/", ResponseNamespace="http://storagepoint.net/soap/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]

public bool UploadStart(string SessionKey, long FolderId, string FileName, System.SByte bUseCompression, long UncompressedSize, System.DateTime Created, System.DateTime Modified, System.DateTime Accessed, ref string StreamToken) {

object[] results = this.Invoke("UploadStart", new object[] {

SessionKey,

FolderId,

FileName,

bUseCompression,

UncompressedSize,

Created,

Modified,

Accessed,

StreamToken});

StreamToken = ((string)(results[1]));

return ((bool)(results[0]));

}

 
And the SOAP message that is sent is:

<?xml version="1.0" encoding="UTF-8"?>

<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"><soap-env:Header/>

<soap-env:Body><UploadStart xmlns="http://storagepoint.net/soap/" xmlns:A="http://www.w3.org/2001/XMLSchema-instance" xmlns:B="http://www.w3.org/2001/XMLSchema-instance" xmlns:C="http://www.w3.org/2001/XMLSchema-instance">

<SessionKey>5617F6B2-AEAB-45CF-80C2-ED0379109DD9</SessionKey>

<FolderId>8</FolderId>

<FileName>run.cmd</FileName>

<bUseCompression>0</bUseCompression>

<UncompressedSize>695</UncompressedSize>

<Created A:type="DateTime">12/17/2002 4:39:40 PM</Created>

<Modified B:type1="DateTime">12/17/2002 4:39:40 PM</Modified>

<Accessed C:type2="DateTime">12/17/2002 4:39:40 PM</Accessed>

<StreamToken></StreamToken>

</UploadStart>

</soap-env:Body>

</soap-env:Envelope>

 

And the error I get is:

<?xml version="1.0" encoding="UTF-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
  <soap:Body>
    <soap:Fault>
      <faultcode>soap:Client</faultcode>
      <faultstring>Server was unable to read request. --&gt; There is an error i
n XML document (2, 565). --&gt; String was not recognized as a valid DateTime.</
faultstring>
      <detail/>
    </soap:Fault>
  </soap:Body>
</soap:Envelope>

The strange thing here is, the error message says that the error is at column 565 which is surprisingly <Modified> time. Does this mean that the <Created> time is in correct format?

Thanks!!

 Scott Nichol <sn...@scottnichol.com> wrote:Can you post the WSDL for the C# web service?

Scott Nichol

----- Original Message -----
From: "Siddhartha Mehta" 
To: 
Sent: Tuesday, December 17, 2002 6:55 PM
Subject: Using DateTime object


>
> I am using C# webservice and a Java client. One of the functions in my
webservice expects a DateTime (C# object). How would I send a datetime
object from my Java client code? Can anyone help me.
>
> Thanks,
>
> Siddhartha
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now


--
To unsubscribe, e-mail: 
For additional commands, e-mail: 



---------------------------------
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

Re: Using DateTime object

Posted by Scott Nichol <sn...@scottnichol.com>.
Can you post the WSDL for the C# web service?

Scott Nichol

----- Original Message -----
From: "Siddhartha Mehta" <si...@yahoo.com>
To: <so...@xml.apache.org>
Sent: Tuesday, December 17, 2002 6:55 PM
Subject: Using DateTime object


>
> I am using C# webservice and a Java client. One of the functions in my
webservice expects a DateTime (C# object). How would I send a datetime
object from my Java client code? Can anyone help me.
>
> Thanks,
>
> Siddhartha
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now


Re: Using DateTime object

Posted by Scott Nichol <sn...@scottnichol.com>.
Can you post the WSDL for the C# web service?

Scott Nichol

----- Original Message -----
From: "Siddhartha Mehta" <si...@yahoo.com>
To: <so...@xml.apache.org>
Sent: Tuesday, December 17, 2002 6:55 PM
Subject: Using DateTime object


>
> I am using C# webservice and a Java client. One of the functions in my
webservice expects a DateTime (C# object). How would I send a datetime
object from my Java client code? Can anyone help me.
>
> Thanks,
>
> Siddhartha
>
>
>
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Mail Plus - Powerful. Affordable. Sign up now