grace smith

Greenhorn
+ Follow
since Jun 14, 2005
Merit badge: grant badges
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 grace smith

Hi,


Is IBM portal toolkit plug-in for WSSD free download? I saw all the portal toolkit version links are broken links. I am currently using the WSSD v5.1.1 and I am wondering how would I get the portal toolkit plug-in download?

Please help me, I am stuck here and can not move on for the portlet study.

thanks in advance,
14 years ago
Hello,

I am learning portlets with the IBM portal v5 in the WSSD 5.1.1 environment. I am trying to download the IBM portal toolkit V5.0.2.1 as the WSSD plugin. But from the IBM portal zone download site,all the portal toolkit download links are broken.

http://www-306.ibm.com/software/info1/websphere/index.jsp?tab=products/portaltoolkit

Can someone let me know where you get the portal toolkit download?
and also, should I start portal/portlet with the IBM portal v5 or v6?

thanks
14 years ago
Hi,

I am planing to expose a web function as the webservice to our client. the function expects total 11 in-parameters. they are quite complicated, Some are required and some are optional. some are even conditional optional.

I'd like to ask which way I map the in-parameter in the WSDL is better? - map the parameter as complex elements or map them as element attributes? if map them as attributes, then how it is going to affect my webservice function declaration at java code?

please help, thanks
16 years ago
I bet my problem could be that my client code let each request initiates a new service stub, since each stub will start a new session, so it results in that each request will get a different JSESSIONID added in the response header.

I just modified the code and let the client only iniciate a new stub through the service locator at the first request, later stub reference will be pulled out from session. In this way, same client will call the same service from the same stub and will be bound within the same session.

After I changed my client code in this way, then I go back to the TCP/IP monitor, I see only the first response send a new JSESSIONID in the header, then later response based on the same client's different request to the same service will has no JSESSIONID shows up in the response header anymore. If I open a second browser window to simulate a second client request, then this response will has a nother new JSESSIONID added in it's header. Is the result correct now?

At nowhere I can see the request header contains the JSESSIONID, should it be there? and I only see the first response has the new JSESSIONID in the header. the subsequent response will has no JSESSIONID in the header.
16 years ago
Hi,

I tried this way to make a session tracking in web service:

in the service SEI, I let it implement the ServiceLifecycle in order to access the HttpSessionContext and do the resource session management there.

in the client, I add the property setting for the stub to indicate the client will participate with the session management,
stub._setProperty(Stub.SESSION_MAINTAIN_PROPERTY, Boolean.TRUE);

when I run the client and monitor the service transaction in the TCP/IP monitor, I see each time, in the same brower,every time you run the same client request, the http response header will have different JSESSIONID added in the header.

Should the same client(same web browser window) for the same service request stay in the same session?
16 years ago
Hi,

I have a webservice client, it can handle only 30 records returned from web service at a time. so they will pass in a parameter for the max number of records to return (which should be 30) and then for subsequent calls, they'll just simply pass in a "Next" flag, meaning we should return the next batch of records from our webservice.

so, the web service will need to keep track of all this from one call to the next, and if sessions work it'll make things easier.

Is there a similar concept to sessions when using web services? I.e., is there a way to tell from a subsequent call to a web service whether it's from the same client? Do web service clients have sessions, session IDs, etc. like regular web users?


Please help. Thanks
16 years ago
Hi,



Is there a similar concept to sessions when using web services? I.e., is there a way to tell from a subsequent call to a web service whether it's from the same client? Do web service clients have sessions, session IDs, etc. like regular web users?
16 years ago
Hi,

I am looking for the answer sheet for the HeadFirst EJB Sharpen your pencil sections.

From the link http://www.wickedlysmart.com/HeadFirst/HeadFirstEJB/HeadFirstEJBIndex.html

there are only 3 pdf files, EJBSharpenA.pdf and B and C. The C end up by the page 497 and everything beyound that point, I have no where to find.

If someone know where to get answer sheet for the later chapters, please let me know. I apprecaite for that.
hello,

I have some elements need to define for the day, month, year. In the WSDL, if I define the day as
<element name="dobDay" nillable="true" type="xsd:gDay"/>
then the soap binding will bind it to vendor specific Java Object - I am using websphere 5.1, so it mapped to com.ibm.ws.webservices.engine.types.Day type in the SEI function parameter.

I am wondering if my client is not using websphere, then using this WSDL, they could generate a different kind soap binding object for the xsd:gDay and does not match my service SEI. and then could couse the webservice access failed.

what should I do? avoid to use the xsd:gDay type and directly define it as
xsd:string and restrict it to the right format and also define application exception fault for the format validation?

can someone help me?
16 years ago
Hi all,

I posted couple messages but seems not big response. So I will simplify my question as this:

What is the good or standard way to implement the webservice so the ciient will know the rule of the data format so they can do the program validation at their side? I listed couple ways I tried, could anyone tell me any way better or is there any other or standard way?

1. I tried to define Simple Type for SSN retrct it as 9 digit without'-' or '/' and then derived the complex type as this in the wsdl:

<simpleType name="socialSecurityNumber">
<restriction base="xsd:string">
<pattern value="\d{3}\d{2}\d{4}"/>
</restriction>
</simpleType>

<element name="findBySSN">
<complexType>
<sequence>
<element name="SSN" nillable="true" type="intf:socialSecurityNumber"/>
</sequence>
</complexType>
</element>

it finally works but the simple Type defined in the WSDL will cause stub generated extra java Object like SocialSecurityNumber.java and I have to modify the SEI to change the passing in String ssn to Object SocialSecurityNumber SSN. that is painful.


2. do not define any restriction on the SSN, just simple xsd:string type,but define webservice application exception for bad SSN input and map the exception as the fault in the WSDL. This way, the client will see the fault detail and figure out the format for the SSN input requirement.

this way seems ease the webservice programming, but client have to wait till the run time to find out the ssn format.

3. Add document/comment in the wsdl for the restriction on some special element requirement ?

Appreciate any help.
16 years ago
Watsh,

Thanks so much for your quick and helpful reply. Your second suggestion works. I added in the SocialSecurityNumber.java class to my service side package and adjusted the SEI function parameter too, I see it works.

Then I come up with more questions - The way I did not use direct xsd:string type for ssn is because I want to set up the data format rule in the WSDL through the schema so the client will check directly from the WSDL and program at their side for the input parameter validation. but this way seems give the service side programming more burdens- we have to code extra Object due to any simple type we defined in the schema. also as the service code, we still need to check the format of input parameter and define the application exception and map it as the fault to the WSDL. to me, define the complicated complex restricted or extention type in the schema is just offering the convience for the client, right? If we do it simple and just use the basic as xsd:string for the ssn, the client has to figure out the input parameter format at runtime base on the fault we mapped, right?

as your opinion, which way is better?

thanks
16 years ago
Hello,

In my SEI, I have a function like:
public Member findBySSN(java.lang.String SSN);


In the WSDL, I defined the related element and operation so on as:

....
<simpleType name="socialSecurityNumber">
<restriction base="xsd:string">
<pattern value="\d{3}\d{2}\d{4}"/>
</restriction>
</simpleType>

<element name="findBySSN">
<complexType>
<sequence>
<element name="SSN" nillable="true" type="intf:socialSecurityNumber"/>
</sequence>
</complexType>
</element>


<element name="findBySSNResponse">
<complexType>
<sequence>
<element maxOccurs="unbounded" name="findBySSNReturn" type="tns2:Member"/>
</sequence>
</complexType>
</element>

<wsdl:message name="findBySSNRequest">
<wsdl art element="intf:findBySSN" name="parameters"/>
</wsdl:message>

<wsdl:message name="findBySSNResponse">
<wsdl art element="intf:findBySSNResponse" name="parameters"/>
</wsdl:message>

<wsdl peration name="findBySSN">
<wsdl:input message="intf:findBySSNRequest" name="findBySSNRequest"/>
<wsdl utput message="intf:findBySSNResponse" name="findBySSNResponse"/>
</wsdl peration>

....


The problem is when I create the service client, the client side stub automatic generated a new java type SocialSecurityNumber.java, so when the client code call to the SEI function findBySSN(String ssn), it complains that the type defined is not applicable with the argument type string because the client . soapbindingstub.java generated for the soapbinding on the SEI findBySSN method is actually as this:

public Member findBySSN(SocialSecurityNumber SSN) throws java.rmi.RemoteException{ ....}.


What should I do with this error? Basically, how do I deal with the WSDL complex type to java binding?

Anyone can help me out? Thanks in advance.

-Helen
16 years ago
Hello,

I am building a document/literal webservice in websphere. The WSDL is generated from exsting java bean.

in the java bean there is a function requesting passing in the social security number. In the generated WSDL it defines this part as:

<element name="findBySSN">
<complexType>
<sequence>
<element name="SSN" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
</element>


My questions are:

1. How could I modify the WSDL and make it more restricted on the SSN number? - say it has to be 9 digit number without '-'. I saw some example using simple typed element and restrict on base string, but I tried on the above complex type, it has error.

2. Even I modifed the above wsdl and restrict the SSN format, then should my service also need to check the format of client passed in SSN parameter and throw user defined exception and map it to the WSDL as fault?


If someone can give me some help and advise, I would highly appreciate.

thanks,
16 years ago
Hello,

I am using Websphere java to wsdl tool generate the wsdl for a webservice.
I am wondering where and how should I define the element part constraits - say the SSN should be in format of 9 digit number without any '-'.

Should the WSDL schema define this or should WSDL define some fault part if client passed in wrong format SSN?

here is my part of my WSDL, how should I define the constraints for SSN?

<element name="findBySSN">
<complexType>
<sequence>
<element name="SSN" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
</element>
16 years ago
Thanks.

For the static webservice(two party point to point), I can tell my client what kind of WS-Security I am using and he should also use the same WS-Security. But for the dynamic webservice which is published to UDDI, the client has no clue what WS-Security to use based on the WSDL, so he will have to count on the fault exception to decode what kind WS-Security to implement at his side? Is that too much for the client?
16 years ago