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

Suzi Cooper

Ranch Hand
+ Follow
since Jul 23, 2005
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
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 Suzi Cooper

The web-service is written in .NET by a third party. I have to write the client for it. Being new to this arena of web-services, I was trying to write a very simplistic client.
11 years ago
I have tried upgrading to axis1.4 but I still get the same request object as above with empty namespace.

Anyone has any pointers on how to get around this?
11 years ago
I am trying to write a web service client using axis 1.2
Here is the code:




The issue is it generates a request object with an empty namespace for the target and hence it get an invalid response. Here is the request object:



Here is the wsdl.It uses document/literal type formatting.
<?xml version="1.0" encoding="utf-8" ?>
- <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://tempuri.org/" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
- <wsdl:types>
- <s:schema elementFormDefault="qualified" targetNamespace="http://tempuri.org/">
- <s:element name="ValidateUser">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="GpassID" type="s:int" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="ValidateUserResponse">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ValidateUserResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="SchemeDetails">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="SchemeToken" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="SchemeDetailsResponse">
- <s:complexType>
- <s:sequence>
- <s:element minOccurs="0" maxOccurs="1" name="SchemeDetailsResult">
- <s:complexType>
+ <s:sequence>
<s:element ref="s:schema" />
<s:any />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="SchemeList">
- <s:complexType>
- <s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="SchemeToken" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>
- <s:element name="SchemeListResponse">
- <s:complexType>
- <s:sequence>
- <s:element minOccurs="0" maxOccurs="1" name="SchemeListResult">
- <s:complexType>
- <s:sequence>
<s:element ref="s:schema" />
<s:any />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
- <wsdl:message name="ValidateUserSoapIn">
<wsdl:part name="parameters" element="tns:ValidateUser" />
</wsdl:message>
- <wsdl:message name="ValidateUserSoapOut">
<wsdl:part name="parameters" element="tns:ValidateUserResponse" />
</wsdl:message>
- <wsdl:message name="SchemeDetailsSoapIn">
<wsdl:part name="parameters" element="tns:SchemeDetails" />
</wsdl:message>
- <wsdl:message name="SchemeDetailsSoapOut">
<wsdl:part name="parameters" element="tns:SchemeDetailsResponse" />
</wsdl:message>
- <wsdl:message name="SchemeListSoapIn">
<wsdl:part name="parameters" element="tns:SchemeList" />
</wsdl:message>
- <wsdl:message name="SchemeListSoapOut">
<wsdl:part name="parameters" element="tns:SchemeListResponse" />
</wsdl:message>
- <wsdl:portType name="FlexSimpleERPSoap">
- <wsdl:operation name="ValidateUser">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Validates UserID passed in from eRewards Plus.</wsdl:documentation>
<wsdl:input message="tns:ValidateUserSoapIn" />
<wsdl:output message="tns:ValidateUserSoapOut" />
</wsdl:operation>
- <wsdl:operation name="SchemeDetails">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">Current status and details of requested Flex Scheme for eRewards Plus.</wsdl:documentation>
<wsdl:input message="tns:SchemeDetailsSoapIn" />
<wsdl:output message="tns:SchemeDetailsSoapOut" />
</wsdl:operation>
- <wsdl:operation name="SchemeList">
<wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">List of available Flex Schemes with status for requested user for eRewards Plus.</wsdl:documentation>
<wsdl:input message="tns:SchemeListSoapIn" />
<wsdl:output message="tns:SchemeListSoapOut" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="FlexSimpleERPSoap" type="tns:FlexSimpleERPSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="ValidateUser">
<soap:operation soapAction="http://tempuri.org/ValidateUser" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="SchemeDetails">
<soap:operation soapAction="http://tempuri.org/SchemeDetails" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="SchemeList">
<soap:operation soapAction="http://tempuri.org/SchemeList" style="document" />
- <wsdl:input>
<soap:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:binding name="FlexSimpleERPSoap12" type="tns:FlexSimpleERPSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="ValidateUser">
<soap12:operation soapAction="http://tempuri.org/ValidateUser" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="SchemeDetails">
<soap12:operation soapAction="http://tempuri.org/SchemeDetails" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
- <wsdl:operation name="SchemeList">
<soap12:operation soapAction="http://tempuri.org/SchemeList" style="document" />
- <wsdl:input>
<soap12:body use="literal" />
</wsdl:input>
- <wsdl:output>
<soap12:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="FlexSimpleERP">
- <wsdl:port name="FlexSimpleERPSoap" binding="tns:FlexSimpleERPSoap">
<soap:address location="http://flexsimple.garfield/ws/FlexSimpleERP.asmx" />
</wsdl:port>
- <wsdl:port name="FlexSimpleERPSoap12" binding="tns:FlexSimpleERPSoap12">
<soap12:address location="http://flexsimple.garfield/ws/FlexSimpleERP.asmx" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

Can someone give me pointers as what i am missing here??
[ December 04, 2008: Message edited by: Suzi Cooper ]
11 years ago
Thanks...got that sorted.

Another question though....for my request


I get an error response : Sorry, the user ID you supplied was not recognised

However, if i remove parameter type arguments (xsi:type="xsd:int" xmlns=""), I get a valid response



If i do not set 'addParameter' and 'returnType', i get the same error message. The request looks like this:



The wsdl doc is as follows:
.......
<s:element name="ValidateUser">
<s:complexType>
<s:sequence><s:element minOccurs="1" maxOccurs="1" name="GpassID" type="s:int" />
</s:sequence>
</s:complexType>
</s:element>
<s:element name="ValidateUserResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ValidateUserResult" type="s:string" />
</s:sequence>
</s:complexType>
</s:element>

..............
<wsdl peration name="ValidateUser">
<soap peration soapAction="http://tempuri.org/ValidateUser" style="document" />
<wsdl:input><soap:body use="literal" /> </wsdl:input>
<wsdl utput><soap:body use="literal" /> </wsdl utput>
</wsdl peration>

.......

How do i fix my request object?
11 years ago
Hi guys,

I am writing a client to call a web-service. I have installed TcpMon as a utility in eclipse to monitor the request/response but i am a little confused in configuring it.

Web service client code is :


THe web-service is invoked through a jsp of my web-app http://localhost:8080/myapp/test.xhtml)

In Eclipse i do the following steps:
1) Windows --> view--> other --> TCP monitor
2) In my TCP monitor ,i add the following param :
Listen Port# = 9090
Target Hostname : flexsimple.garfield
Target Port# : 80

When i invoke the web service, i don't get any message in tcpmon.

What am i missing here?Do i need to change th client side code?

Thanks for the help.
11 years ago
Thanks a lot. I misunderstood the padding concept i guess.
11 years ago
Thanks for the info.
Please correct me if i am wrong here...if i use padding , should it not add relevant number of bytes to the key to make it 24 bytes.



What am i missing here?
11 years ago
Here is what i am trying to do : I am calling a web service with encryted string (Triple DES). The encryption key provided is : "kgl51um6adpbjnbz6xln" which is 20bytes.

Here is the code :



I get the following exception:
java.security.InvalidKeyException: Invalid key length: 20 bytes

Am i missing something very basic here?
I am a novice to this arena so apologies if this is a silly question.
[ November 07, 2008: Message edited by: Suzi Cooper ]
11 years ago
Hi,

I am trying to encrypt a string using Triple DES algorithm but i get the following exception :

java.security.InvalidKeyException: Wrong key size

Here is the code :



I have added the JCE jars (local_policy.jar and US_export_policy.jar) in JAVA_HOME/jre/security as suggested by some posts.

I understand that DESedeKeySpec requires at least 24 bytes and my string is around 20.

Can anyone suggest how to fix this?
11 years ago
I am able to create a PDF locally.But i want it to be rendered to the browser instead.
Hi guys,

I am trying to create a pdf(using Flying Saucer) and display it in the browser but i keep getting a blank page. Here's a code snippet :

########

// read XML and convert to pdf
String inputFile = "weather.xml";


ByteArrayOutputStream baos = new ByteArrayOutputStream();

ITextRenderer renderer = new ITextRenderer(900,200);
renderer.setDocument(new File(inputFile));
renderer.layout();
renderer.createPDF(baos);


response.reset();
response.setContentType("application/pdf");
response.setContentLength(baos.size());

ServletOutputStream out = response.getOutputStream();
baos.writeTo(out);
out.flush();

###########

Anyone any ideas ?
Thanks. The suggested ways for both scenarios worked with no major issues.
That does not sound easy.
Can you point to me if there is a major flaw with the following approach : 1) Through SVN Repository perspective, create a folder 'Trunk'
2)Right-Click and move all the folders/ files under this directory including .project file.
3) Create a new folder 'Branch'
4)From java perspective, (Team--> Branch/Tag) create a branch of the working copy.

Will this mess up any files?
Hi Folks,

I have an existing project in SVN created a few weeks ago. I now need to do 2 things:
a) Move the existing project into the trunk folder.
b) Create a branch from my working copy.

I use MyEclipse as IDE.I do have an idea about creating a branch but i am not sure how to move my exisitng project into the 'Trunk' folder.

Can some-one suggest a neat way to do this without messing my exisitng project?

Thanks.