Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS forum!

Chintan B Shah

Ranch Hand
+ Follow
since Sep 23, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Chintan B Shah

Hi folks,

Problem was with the encoding of my terminal client(Putty).

Just for your info, encoding can be changed under "Change Settings-->Windows-->Translation" in Putty.

My co-worker pointed it out .

Thanks
Chintan.
8 years ago
Hi folks,

Problem was with the encoding of my terminal client(Putty).

Just for your info, encoding can be changed under "Change Settings-->Windows-->Translation" in Putty.

My co-worker pointed it out .

Thanks
Chintan.
8 years ago
Hi everyone,

I am invoking a jar from Linux command prompt with following parameters:

./Client.jar "1" "http://abc.com" "Equinix vous informe d.un nouvel incident réseau à SV. Merci de vérifier vos courriels ou notre portail client pour de plus amples informations."

Now, when I print args[2], it shows this
Equinix vous informe d.un nouvel incident r�seau � SV. Merci de v�rifier vos courriels ou notre portail client pour de plus amples informations.

These are latin(French) characters.

How can I make them display exactly the same way they are passed?

P.S.: I posted detailed msg here..
Java Charset UTF-8, ISO-8859-1 Encoding issue
..but then I figured that it could be more of Java-in general question and not web-services related...so I tried to trim down issue in this thread.


Appreciate any assistance.

Thanks
Chintan.

8 years ago
Hi Folks,

I will try to make this easy.

My architecture is like this

Remedy server-->Remedy Midtier-->Remedy Web Service-->My web-service client(JAX-WS)-->data gets stored in "String".

I am working with Remedy application that has data stored in French (with all special latin characters).

e.g. Equinix vous informe d’un nouvel incident réseau à SV. Merci de vérifier vos courriels ou notre portail client pour de plus amples informations.

Now, I am using Remedy web-service to retrieve this data(Remedy WSDL supports UTF-8) and in SOAP Response it looks like this

---[HTTP response - http://<servername>; - 200]---
Transfer-encoding: chunked
null: HTTP/1.1 200 OK
Content-type: text/xml;charset=utf-8
Server: Apache-Coyote/1.1
Date: Wed, 13 Jun 2012 21:17:53 GMT
Set-cookie: JSESSIONID=A94D284C2F31FDDC77880361AB4BEC4A; Path=/arsys
<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Body><ns0:OpGetResponse xmlns:ns0="urn:RemedyECPIntegration" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<ns0:Arguement_Builder>
Equinix vous informe d’un nouvel incident réseau à SV. Merci de vérifier vos courriels ou notre portail client pour de plus amples informations.
</ns0:Arguement_Builder>
</ns0:OpGetResponse></soapenv:Body></soapenv:Envelope>--------------------

I am using JAX-WS Library to write my web-service client.

When this data gets stored in "String" since that is what return parameter data-type is, it looks like below
Equinix vous informe dâun nouvel incident réseau à SV. Merci de vérifier vos courriels ou notre portail client pour de plus amples informations.


Now, the text that I need in "String" is the original text that is stored in Remedy which is
Equinix vous informe d’un nouvel incident réseau à SV. Merci de vérifier vos courriels ou notre portail client pour de plus amples informations.

How can I achieve it?

Any help is greatly appreciated.

P.S.: I have gone through various links about using CharSet encoding/decoding and none of it is working.

Thanks
Chintan.
8 years ago
Hi Vijitha,

I have already tried that. Doesnt work.


Created/deleted multiple new applications from scratch and tried to create web-service client, still same issue.

Thanks
Chintan.
8 years ago
Hello Vijitha,

I am using Netbeans IDE(6.9) and creating a web application with METRO2.0 Library.

Then, right click on Web application-->"Generate New Web-Service Client"-->GUI contains following things

1. Specify WSDL URL.
2. Place where you want to store stubs
3. Type(JAX-RPC/JAX-WS). I selected JAX-WS.

Once done, hit Finish.

Essentially, following the JAX-WS Web Service Client wizard

The time when it tries to generate the stubs is when I get that error message.

Thanks for your time and response.

Thanks
Chintan.
8 years ago
If you are using METRO 2.0 library, you can do the following in your code to see HTTP Request/Response on console(client side setting).

HttpTransportPipe.dump = true;


package to import:
import com.sun.xml.ws.transport.http.client.HttpTransportPipe;

You can do this just before invoking SOAP Call.

Thanks
Chintan.
8 years ago
Hello all,

I am getting an error message(please see attachment as well) while generating client stubs for this WSDL.

https://ws.envoyprofiles.com/WebService/EPAPI_1.0/wsdl.wsdl


[ERROR] A class/interface with the same name "https.ws_envoyprofiles_com.webservice.epapi_1_0.namespace.EventSubscriptionStatisticsRequest" is already in use. Use a class customization to resolve this conflict.
line 3143 of file:/C:/TestOutage/xml-resources/web-service-references/wsdl/wsdl/ws.envoyprofiles.com/WebService/EPAPI_1.0/wsdl.wsdl

[ERROR] (Relevant to above error) another "EventSubscriptionStatisticsRequest" is generated from here.
line 1199 of file:/C:/TestOutage/xml-resources/web-service-references/wsdl/wsdl/ws.envoyprofiles.com/WebService/EPAPI_1.0/wsdl.wsdl

[ERROR] A class/interface with the same name "https.ws_envoyprofiles_com.webservice.epapi_1_0.namespace.EventSubscriptionStatisticsResponse" is already in use. Use a class customization to resolve this conflict.
line 3148 of file:/C:/TestOutage/xml-resources/web-service-references/wsdl/wsdl/ws.envoyprofiles.com/WebService/EPAPI_1.0/wsdl.wsdl

[ERROR] (Relevant to above error) another "EventSubscriptionStatisticsResponse" is generated from here.
line 1207 of file:/C:/TestOutage/xml-resources/web-service-references/wsdl/wsdl/ws.envoyprofiles.com/WebService/EPAPI_1.0/wsdl.wsdl

[ERROR] A class/interface with the same name "https.ws_envoyprofiles_com.webservice.epapi_1_0.namespace.MemberCustomFieldSimpleSetRequest" is already in use. Use a class customization to resolve this conflict.
line 3719 of file:/C:/TestOutage/xml-resources/web-service-references/wsdl/wsdl/ws.envoyprofiles.com/WebService/EPAPI_1.0/wsdl.wsdl

[ERROR] (Relevant to above error) another "MemberCustomFieldSimpleSetRequest" is generated from here.
line 1541 of file:/C:/TestOutage/xml-resources/web-service-references/wsdl/wsdl/ws.envoyprofiles.com/WebService/EPAPI_1.0/wsdl.wsdl

[ERROR] Two declarations cause a collision in the ObjectFactory class.
line 3148 of file:/C:/TestOutage/xml-resources/web-service-references/wsdl/wsdl/ws.envoyprofiles.com/WebService/EPAPI_1.0/wsdl.wsdl

[ERROR] (Related to above error) This is the other declaration.
line 1207 of file:/C:/TestOutage/xml-resources/web-service-references/wsdl/wsdl/ws.envoyprofiles.com/WebService/EPAPI_1.0/wsdl.wsdl

[ERROR] Two declarations cause a collision in the ObjectFactory class.
line 1541 of file:/C:/TestOutage/xml-resources/web-service-references/wsdl/wsdl/ws.envoyprofiles.com/WebService/EPAPI_1.0/wsdl.wsdl

[ERROR] (Related to above error) This is the other declaration.
line 3719 of file:/C:/TestOutage/xml-resources/web-service-references/wsdl/wsdl/ws.envoyprofiles.com/WebService/EPAPI_1.0/wsdl.wsdl

[ERROR] Two declarations cause a collision in the ObjectFactory class.
line 1199 of file:/C:/TestOutage/xml-resources/web-service-references/wsdl/wsdl/ws.envoyprofiles.com/WebService/EPAPI_1.0/wsdl.wsdl

[ERROR] (Related to above error) This is the other declaration.
line 3143 of file:/C:/TestOutage/xml-resources/web-service-references/wsdl/wsdl/ws.envoyprofiles.com/WebService/EPAPI_1.0/wsdl.wsdl



Now, I am a complete novice to JAXB and its customization and would appreciate if someone can provide step-by-step tutorial to fix this issue.

Thanks in advance.

Regards,
Chintan.
8 years ago
Mike and Winston, I think you guys hit the nail right on the head. Bottom line, I will research more with the 3rd party on why they are returning -7 instead of -8 in SOAP Envelope.

Thanks everyone for your time and valuable input on this thread.

Regards,
Chintan.
8 years ago
Hi everyone,

First of all, thanks so much for chiming in.

I am located in California and 3rd party server as well as my server(where this Gregorian calendar code runs) are located in PST timezone.

I did try adding timezones and actual Date value when it came out looked completely different(because I believe it takes date and then converts it to that timezone and then displays it).

Actually the user requirement is not to add any timezone to the date that is returned by 3rd party. If 3rd party is sending, "12/101/2011 1:00:00 PM", I need to have that same date without using any timezone.

What bugs me is why was it working before DST and all of sudden it was off by an hour after DST?

Sorry if I am sounding a lot like non-programmer here


Thanks
Chintan.

8 years ago
Ok...so the below code worked out!


which makes me think if there is something wrong with using toGregorianCalendar()?



Using new() with GregorianCalendar works fine whereas "toGregorianCalendar()" failed in my case.

Any opinions/thoughts?


Thanks
Chintan.
8 years ago
Hi John,

Not sure what you mean by input String..web-service returns XMLGregorianCalendar. There is no string involved here.

In SOAP Envelope, date comes like this(sample)
<ns0:Create_Date>2011-11-09T05:00:00-07:00</ns0:Create_Date>

I am using JAX-WS Library to generate stubs for that web-service.

Once I get the date in form of XMLGregorianCalendar object from web-service, I used the code mentioned above to convert it to an actual "Date" object in java.

Thanks
Chintan.
8 years ago
Hello all,

I was under the impression that Java takes care of DST automatically, but looks like it doesnt.

I am accessing a web-service which returns the time in XMLGregorianCalendar format.

e.g. 3rd party application stores date as "12/11/2011 8:45:00 AM". When accessing their service and then using below code to convert to "Date" object, I get the time as "12/11/2011 7:45:00 AM"



Now, I did verify that details within XMLGregorianCalendar are correct(using getMonth(), get Day() etc. API's)), however once I convert it to GregorianCalendar it messes up.

This same code was working before DST.

FYI, I do not specify any timezone anywhere in code.

Any help on resolving this issue is much appreciated.

Thanks
Chintan.
8 years ago
Hi Fatih,

Yes, you are right. I was googling around more after posting this topic and found this link

String To Clob in Java

which also says the same thing.

setString did work for my scenario.

Thanks much.

Best Regards,
Chintan.
Hi Folks,

I need to call a stored procedure where 2 of its IN parameters are of CLOB data type.

Stored procedure looks something like this


I have to query another application(through web-service) to get Emails, subject , body. I get all of those as String.

So I wrote the code that uses a callable statement and does following


No errors, exceptions are thrown. Code just stops while executing those lines and exits.

ENV: JDK1.6, OJDBC14.JAR in class path.

Any help on troubleshooting this is much appreciated.

Best Regards,
Chintan.