Sandesh Jadhav

Greenhorn
+ Follow
since Nov 01, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
In last 30 days
0
Forums and Threads

Recent posts by Sandesh Jadhav

Hi,

I created a simple 'document/literal' style webservice in Eclipse for addition of two numbers. And now m trying to create a simple java client which would call webservice. When I try to run the client it says "rpc" not supported even though m calling the document style web service. I know RPC/encoded style is not WS-I complient.

Here is an exception
Exception in thread "main" operation style: "rpc" not supported
at com.sun.xml.rpc.client.dii.BasicCall.unsupportedOperationStyleException(BasicCall.java:583)
at com.sun.xml.rpc.client.dii.BasicCall.invoke(BasicCall.java:515)



here is my wsdl file,

AddNumbers.wsdl



<?xml version="1.0" encoding="UTF-8" ?>
- <wsdl:definitions targetNamespace="http://DefaultNamespace" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://DefaultNamespace" xmlns:intf="http://DefaultNamespace" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
- <!--
WSDL created by Apache Axis version: 1.2.1
Built on Jun 14, 2005 (09:15:57 EDT)

-->
- <wsdl:types>
- <schema elementFormDefault="qualified" targetNamespace="http://DefaultNamespace" xmlns="http://www.w3.org/2001/XMLSchema">
<element name="a" type="xsd:int" />
<element name="b" type="xsd:int" />
<element name="addReturn" type="xsd:int" />
</schema>
</wsdl:types>
- <wsdl:message name="addRequest">
<wsdl:part element="impl:a" name="a" />
<wsdl:part element="impl:b" name="b" />
</wsdl:message>
- <wsdl:message name="addResponse">
<wsdl:part element="impl:addReturn" name="addReturn" />
</wsdl:message>
- <wsdl:portType name="AddNumbers">
- <wsdl:operation name="add" parameterOrder="a b">
<wsdl:input message="impl:addRequest" name="addRequest" />
<wsdl:output message="impl:addResponse" name="addResponse" />
</wsdl:operation>
</wsdl:portType>
- <wsdl:binding name="AddNumbersSoapBinding" type="impl:AddNumbers">
<wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <wsdl:operation name="add">
<wsdlsoap:operation soapAction="" />
- <wsdl:input name="addRequest">
<wsdlsoap:body use="literal" />
</wsdl:input>
- <wsdl:output name="addResponse">
<wsdlsoap:body use="literal" />
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
- <wsdl:service name="AddNumbersService">
- <wsdl:port binding="impl:AddNumbersSoapBinding" name="AddNumbers">
<wsdlsoap:address location="http://node112:7081/WebServicesTest/services/AddNumbers" />
</wsdl:port>
</wsdl:service>
</wsdl:definitions>




Am I missing something here?

Appreciate your help...

Sandesh



15 years ago
Hi,

I am unable to import the schema file whenever I try to invoke my webservice deployed on tomcat.
It gives following error:

'The element '#import' is not permitted as constrained by 'http://www.w3.org/2001/XMLSchema#schema_._type'; expecting annotation | redefine | import | include | attributeGroup | group | complexType | simpleType | notation | attribute | element | nothing'

15 years ago

Sandesh Jadhav wrote: I am passing valid user id and password to connect to the database along with the connection string. It works fine when I run it as a standalone java application. But when I try to run it on a tomcat, it gives me that error.

Actually I am passing my machine id and password along with the connection string as the database is on my machine only and it's works fine when I run it as a standalone java application. But when I try to run it on a tomcat, it gives me that error.
Hi,

I am working on a java web service which I have deployed on Tomcat 5.5. I am using the following driver to connect to the DB2 v8.1 database

Class.forName("com.ibm.db2.jcc.DB2Driver");

I have also included required jars in '%CATALINA_HOME%/common/lib/' Still I am getting the following error:

<faultcode>soapenv:Server.userException</faultcode>
<faultstring>com.ibm.db2.jcc.c.SqlException: Connection authorization failure occurred. Reason: User ID or password invalid.</faultstring>


I googled on this then I found out that this is a jdbc driver related issue. Is it or may be I should use the different driver?


Thanks,
Sandesh




Thanks Rob, it worked.
15 years ago
Is there any direct way in Cardlayout to find out whether the currently displaying card is the first or the last card ?

Thanks
15 years ago
I am working on menu-based swing application. I am using CardLayout to display components on JFrame on clicking of the menu. I have used separate jpanel for each set of components to be diplayed inside JFrame. I would also need to layout the components dynamically on each panel on some event. For example, I will be displaying the List which is dynamically generated on clicking of the button inside the same panel. I might be having multiple dynamic components on same panel. So what approach should I take to layout the components inside the panel?

Thanks in advance


Cheers..
15 years ago
Thanks Maneesh,

It really worked using CardLayout.
15 years ago
I am new to Swings. I am working on simple desktop application. My requirement is that I have got a window with Menus in it. On clicking of each menu,I should be able to
display the new set of components. The way I thought is JFrame with menubar set on it. And I will create different classes for each set of components which will extend the JPanel. The functionality of those each of the components set will go into the respective class. And on click event of menu on the JFrame, I'll create the instance of the corresponding class and will add it to the Frame. Also same thing should happen with the clicking of the button, means suppose I click the Next button on one JPanel, I should be able to display the next JPanel. Is there any other simpler way to achieve this?

Thanks in advance...

15 years ago
Thanks Darryl. I've solved the issue. Your suggestions really helped me. i was initially doing it in a more complicated manner.

MyPage.java

public class MyPage{

private List<HostObj> list = new ArrayList<HostObj>();
HostObj hostObj = null;
private HtmlDataTable table;

public List<HostObj> getList() {
return list;
}

public void setList(List<HostObj> list) {
this.list = list;
}

public HtmlDataTable getTable(){
return table;
}

public void setTable(HtmlDataTable table){
this.table = table;
}

public void addHost(ActionEvent ae){
hostObj = new HostObj();
hostObj.setIpAddress(hostObj.getIpAddress());
hostObj.setDirPath(hostObj.getDirPath());
hostObj.setJavaHome(hostObj.getJavaHome());
hostObj.setOracleHome(hostObj.getOracleHome());
list.add(hostObj);
}

public void removeHost(){
hostObj =(HostObj)table.getRowData();
list.remove(hostObj);
}

}

MyPage.jsp

<h:dataTable value="#{panelGrid.list}" var="loc" binding="#{panelGrid.table}">
<h:column>
<h:inputText value="#{loc.ipAddress}"/>
</h:column>
<h:column>
<h:outputText value="Secondary"/>
</h:column>
<h:column>
<h:inputText value="#{loc.dirPath}"/>
</h:column>
<h:column>
<h:inputText value="#{loc.javaHome}"/>
</h:column>
<h:column>
<h:inputText value="#{loc.oracleHome}"/>
</h:column>
<h:column>
<h:commandButton id="remove" styleClass="buttonStyle" value="Remove" action="#{panelGrid.removeHost}"/>
</h:column>
</h:dataTable>
<h:commandButton id="add" styleClass="buttonStyle" value="Add Component" actionListener="#{panelGrid.addHost}">
</h:commandButton>

And it's working fine!!!
16 years ago
JSF
This is what I have done uptil now and it seems to be working fine.

MyPage.jsp

<td colspan="4"><h:panelGrid binding="#{hostSelection.grid}"/></td>
<h:commandButton id="Add" styleClass="buttonStyle" value="#{label.addButton}" title="#{label.addButton}" actionListener="#{myPage.addNewHost}" />

MyPage.java

private List<HostObj> list = new ArrayList<HostObj>();
private HtmlPanelGrid grid;
HtmlInputText txtIP,txtDir,txtJavaHome,txtOracleHome;
HtmlOutputText txtSec;
HtmlCommandLink removeHost;

public void addNewHost(ActionEvent event){

context = FacesContext.getCurrentInstance();

id = (++integerId).toString();

HostObj hostObj = new HostObj();

txtIP = new HtmlInputText();
txtIP.setStyleClass("INPUT");
txtIP.setId(txtIP.getClientId(context)+id);
txtIP.setValue(hostObj.getIpAddress());

txtDir = new HtmlInputText();
txtDir.setStyleClass("INPUT");
txtDir.setId(txtDir.getClientId(context)+id);
txtDir.setValue(hostObj.getDirPath());

txtSec = new HtmlOutputText();
txtSec.setStyleClass("bodyText");
txtSec.setId(txtSec.getClientId(context)+id);
txtSec.setValue("Secondary");

txtJavaHome = new HtmlInputText();
txtJavaHome.setStyleClass("INPUT");
txtJavaHome.setId(txtJavaHome.getClientId(context)+id);
txtJavaHome.setValue(hostObj.getJavaHome());


txtOracleHome = new HtmlInputText();
txtOracleHome.setStyleClass("INPUT");
txtOracleHome.setId(txtOracleHome.getClientId(context)+id);
txtOracleHome.setValue(hostObj.getOracleHome());

removeHost = new HtmlCommandLink();
removeHost.setValue("remove");
removeHost.setId(removeHost.getClientId(context)+id);

grid.setColumns(6);

grid.getChildren().add(txtIP);
grid.getChildren().add(txtSec);
grid.getChildren().add(txtDir);
grid.getChildren().add(txtJavaHome);
grid.getChildren().add(txtOracleHome);
grid.getChildren().add(removeHost);

context.getViewRoot().setTransient(true);

}

public HtmlPanelGrid getGrid(){
return grid;
}

public void setGrid(HtmlPanelGrid grid){
this.grid = grid;
}

HostObj.java

public class HostObj{

private String ipAddress;
private String dirPath;
private String javaHome;
private String oracleHome;

public String getIpAddress() {
return ipAddress;
}

public void setIpAddress(String ipAddress) {
this.ipAddress = ipAddress;
}


public String getDirPath() {
return dirPath;
}

public void setDirPath(String dirPath) {
this.dirPath = dirPath;
}

public String getJavaHome() {
return javaHome;
}

public void setJavaHome(String javaHome) {
this.javaHome = javaHome;
}

public String getOracleHome() {
return oracleHome;
}

public void setOracleHome(String oracleHome) {
this.oracleHome = oracleHome;
}


}

when we call a backing bean method, it adds the new row of components everytime.

Now my requirement is that, I want to add a new commandlink on each row of components and register an actionlistener for it. When we click the command
link, the corresponding row of the components should be removed.

Thanks,
16 years ago
JSF
hi Darrry,

Thanks for your suggestion!!!

I have also tried it using the datatable. But still I am not able to achieve what I wanted. May be I was doing it in a wrong way.
My requirement is to add the new text components on clicking of the command button. The page will get refreshed with the new row of components and data from the previous components will be retained back.
Can you provide me with the exact solution or can you show the sample code you have(if any)?

Cheers,
Sandesh
16 years ago
JSF
I am new to JSF.I have to add multiple components to the page dynamically on clicking of a command button 'Add component' in the following manner

column1 column2 column3
<HtmlInputText> <Lable> <HtmlInputText>

I also want to bind the same to the arraylist in the backing bean. I am using JSF1.1. I tried it using HtmlPanelGrid, butI couldn't. Can anybody provide me with the simple solution?

Thanks in advance
16 years ago
JSF