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" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]> 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: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>