Jump to content
Xtreme .Net Talk

swteam

Members
  • Posts

    10
  • Joined

  • Last visited

About swteam

  • Birthday 03/25/1984

swteam's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hai I am developing an webservice which need to return out as XML file e.g(<ResponseXml><TransactionId >101398</TransactionId ></ResponseXML>) But my web service is returning like this(<?xml version="1.0" encoding="utf-8" ?> <string xmlns="lax"><ResponseXml><TransactionId >0</TransactionId>) can any one tell how can i remove the extra lines while returning here i want to remove (<?xml version="1.0" encoding="utf-8" ?> <string xmlns="lax"> this lines i want tp cut please suggest me how do i procede
  2. thank you i did testing by adding the webreference to my windowsform and try your cod it is working fine. but when i have this url for testing wiht java client, i don't know what is theire code but they said that they are sending the data by using post method. while they are testing they are getting error like this (500 Request format is invalid: text/xml) what should i suggest to clear this error please guide me. they can see my webserive in theire browser and if they are trying by post the data using invoke method it is working fine. the data they providing like this (<TransactionId>123456</TransactionId><VendorTransactionId>110</VendorTransactionId>) so please tell me what to do i struck up my work because of this
  3. Ya i tried by adding the webmethod it is working fine but the string i provided is TramsactionID=string&VendorID=string& and so on, but i want to send data as<TransactionID>string</TransactionID><VendorID>string</vendorID> like this i want to send if i am trying this i am getting an protocolvoilation error my webmoethod is as follows <webmethod()>public function resp(Byval TransactionID as String,Byval VendorID as String) as string dim a as string = TransactionID dim b as string = VendorID after this databaseupdation coding so any changes in my webmethod to accept the data as xmlString format please guide me if it works with the .NET Client then i have to test with JAVA Client
  4. Hai i have developed an web service and i am testing it by calling like this it is giving an Error 500 Remoteserver returned an error the calling code as follows please help how to solve Dim Request As WebRequest = WebRequest.Create("http://156.11.127.18/test/Service.asmx") Request.Method = "POST" Dim PostData As String = "<response><TransactionId>12</TransactionId><VendorTransactionId>13</VendorTransactionId></response>" Dim ByteArray As Byte() = Encoding.UTF8.GetBytes(PostData) Dim Instance As New WebException Dim Value As WebExceptionStatus Request.ContentType = "application/x-www-form-urlencoded" 'Request.ContentType = "XML" ' Set the ContentLength property of the WebRequest. Request.ContentLength = ByteArray.Length ' Get the Request stream. Dim dataStream As Stream = Request.GetRequestStream() ' Write the data to the Request stream. dataStream.Write(ByteArray, 0, ByteArray.Length) ' Close the Stream object. dataStream.Close() ' Get the response. Value = Instance.Status Dim response As WebResponse = Request.GetResponse() ' Display the status. Console.WriteLine(CType(response, HttpWebResponse).StatusDescription) ' Get the stream containing content returned by the server. dataStream = response.GetResponseStream() ' Open the stream using a StreamReader for easy access. Dim reader As New StreamReader(dataStream) ' Read the content. Dim responseFromServer As String = reader.ReadToEnd() TextBox1.Text += responseFromServer ' Clean up the streams. reader.Close() dataStream.Close()
  5. Re: Browser vs code thank you, But is there any way we can test it by me that my service is working fine & Responding properly
  6. Hai all, i developed a webservice which will take the data and update the database here my doubt which url i will provide to the client when i run my service my URL Looks like this http://localhost:2412/test/Service.asmx in the browser it shows two links named as helloworld and response i wrote code in response. so here i am unabe find which url i have to provide to the client please guide me here i am giving link after clicking the response link my url look like this http://localhost:2412/test/Service.asmx?op=response please help me its urgent
  7. Hai, i am developing an application in which i ahve to provide the print option to print the data. for this they provide me one theral printer Model No ATP-80K here i am able print the data using print dailog but as the printer supports cutting the page but using my code i am unable to cut the page so can any one guide me how to procede this k thank you
  8. hai all, i have to send date as long formate my customer having one application which is developed in java it requires the input date as long i have the function when i run the program which in java i am getting a longnumeric value then i found it shows current date as milliseconds from 1970 jan 1 so when i am sending i also want to send it in the same way so please help me how to do it
  9. am developing a webservice here i ahve to give the url to the customer he will add the string to that url so that my service should update the database automatically i am developed a small add method web service which takes two integers as input and gives added value of that this if i take in to my windows application it is working fine but how to test when the user invokes my url it should check for passed value here i am little bit confused which url i need to give to customer whether .asmx file are some thing else please give me idea how to procede.
×
×
  • Create New...