[JBoss Portal] - Re: Tabs don't show up on the new page in default portal
by chris.laprun@jboss.com
"halversp" wrote : Having to explicitly add common instances like the nav, user, etc. to every page definition (with all the right renderset options, security, etc.) gets really tiresome after a while, particularly in our design where we have several such common elements on a couple dozen pages.
|
| Any thought, in some future version, for some sort of "template"/"master"/"prototype", with all properties, instances, etc., that you can declare once and then reference from each individual object def? Without it, it's extraordinarily difficult to maintain a consistent page structure.
Agreed. There's a thread on UI improvements for 2.6 meant to gather ideas such as this: http://www.jboss.com/index.html?module=bb&op=viewtopic&t=87301
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973065#3973065
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973065
19 years, 7 months
[EJB 3.0] - Setting @Table(name=.. @Column(name=.. at runtime
by IceBearOZ
Hi Together,
I am new to EJB3 and therefore I need your help. Please forgive me if this question is not very imaginative.
My case:
----------
Let's say I have two tables with different names but with the same structure:
| Team_Green (id, first_name, last_name)
| Team_Blue (id, first_name, last_name)
|
Now I want to use one entity bean (ejb3) for both tables. Like the following one:
| package ...
|
| import ...
|
| @Entity
| @Table(name="<table_name>")
| public class TeamMember implements Serializable {
|
| private String id;
| private String firstName;
| private String lastName;
|
| public TeamMember() {
| super();
| }
|
| public TeamMember(String id, String firstName, String lastName) {
| super();
| this.id = id;
| this.firstName = firstName;
| this.lastName = lastName
| }
|
| @Id
| @Column(name="id") // I know that this one is not necessary
| public String getId() {
| return id;
| }
| public void setId(String id) {
| this.id = id;
| }
|
| @Column(name="first_name")
| public String getFirstName() {
| return firstName;
| }
| public void setFirstName(String fristName) {
| this.firstName = firstName;
| }
|
| @Column(name="last_name")
| public String getLastName() {
| return lastName;
| }
| public void setLastName(String lastName) {
| this.lastName = lastName;
| }
|
| }
|
My question:
---------------
a:)
How can I set the @Table(name=?...?) at runtime?
Assuming that I know which team member belongs to which team (green or blue):
How can I set the @Table annotation to @Table(name=?Team_Green?) - if the team member belongs to the green team - or to @Table(name=?Team_Blue?) - it the person belongs to the blue team.
Is this in any way applicable? And if yes can someone please give me a short example, tip, hint, etc?
b:)
If a:) is applicable can I do such things with the annotation @Column(name=..) too?
Thanks for your help in advance.
Regards
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973064#3973064
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973064
19 years, 7 months
[JBoss Portal] - Re: Tabs don't show up on the new page in default portal
by halversp
Having to explicitly add common instances like the nav, user, etc. to every page definition (with all the right renderset options, security, etc.) gets really tiresome after a while, particularly in our design where we have several such common elements on a couple dozen pages.
Any thought, in some future version, for some sort of "template"/"master"/"prototype", with all properties, instances, etc., that you can declare once and then reference from each individual object def? Without it, it's extraordinarily difficult to maintain a consistent page structure.
p
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973049#3973049
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973049
19 years, 7 months
[JBossWS] - Consuming .net Web Service using JBOSSWS
by vimalm
Hi
I am trying to consume a .net webservice (document/literal) inside one of my EJB's or a stand alone client starting from a WSDL URL in the form http://someurl/someservice.asmx
The steps I took is to create the supporting classes using WSTOOLS with following configuration and then invoking the web service.
<configuration xmlns="http://www.jboss.org/jbossws-tools">
| <wsdl-java file="someservice.wsdl">
| <mapping file="jaxrpc-mapping.xml" />
| </wsdl-java>
| </configuration>
I downloaded someservice.wsdl from above url?WSDL link. I read that that the URL could be refered in a jboss-client.xml file but I will do that later.
Now in my client I am trying to call the web service using:
package somewebsite;
|
| import java.net.URL;
| import java.io.File;
| import org.jboss.ws.jaxrpc.ServiceFactoryImpl;
| import javax.xml.namespace.QName;
| import javax.xml.rpc.Service;
| import javax.xml.rpc.Stub;
|
| public class Test {
| public static void main(String[] args) {
| Test test = new Test();
| test.call();
| }
|
| public void call() {
| try {
| URL wsdlURL = new URL("http://someurl/someservice.asmx?WSDL");
| ServiceFactoryImpl servFactory = new ServiceFactoryImpl();
| URL mappingURL = new File("jaxrpc-mapping.xml").toURL();
| QName qname = new QName("http://somewebsite.net", "UserManagement");
| Service service = servFactory.createService(wsdlURL, qname, mappingURL);
| UserManagementSoap port = (UserManagementSoap)service.getPort(UserManagementSoap.class); GetUserList gul = new GetUserList("notfound");
| GetUserListResponse gulr = port.getUserList(gul);
| System.out.println("finished" + gulr.getGetUserListResult());
| } catch (Exception ex) {
| ex.printStackTrace();
| }
| }
|
| }
|
I get a connection time out and don't know what is wrong? I know the web service is up and running at the url because I can hit it with a .net client. I am having problem with the java client. I am using JBOSS 4.0.4GA JBOSS WS 1.0.3GA.
Here is the WSDL :
<?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://somewebsite.net/"
| 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://somewebsite.net/"
| xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
| <wsdl:types>
| <s:schema elementFormDefault="qualified" targetNamespace="http://somewebsite.net/">
| <s:element name="UpdateUser">
| <s:complexType>
| <s:sequence>
| <s:element minOccurs="0" maxOccurs="1" name="creatorId" type="s:string" />
| <s:element minOccurs="0" maxOccurs="1" name="input" type="s:string" />
| </s:sequence>
| </s:complexType>
| </s:element>
| <s:element name="UpdateUserResponse">
| <s:complexType>
| <s:sequence>
| <s:element minOccurs="0" maxOccurs="1" name="UpdateUserResult" type="s:string" />
| </s:sequence>
| </s:complexType>
| </s:element>
| <s:element name="DeleteUser">
| <s:complexType>
| <s:sequence>
| <s:element minOccurs="0" maxOccurs="1" name="creatorId" type="s:string" />
| <s:element minOccurs="0" maxOccurs="1" name="input" type="s:string" />
| </s:sequence>
| </s:complexType>
| </s:element>
| <s:element name="DeleteUserResponse">
| <s:complexType>
| <s:sequence>
| <s:element minOccurs="0" maxOccurs="1" name="DeleteUserResult" type="s:string" />
| </s:sequence>
| </s:complexType>
| </s:element>
| <s:element name="GetUserList">
| <s:complexType>
| <s:sequence>
| <s:element minOccurs="0" maxOccurs="1" name="creatorId" type="s:string" />
| </s:sequence>
| </s:complexType>
| </s:element>
| <s:element name="GetUserListResponse">
| <s:complexType>
| <s:sequence>
| <s:element minOccurs="0" maxOccurs="1" name="GetUserListResult" type="s:string" />
| </s:sequence>
| </s:complexType>
| </s:element>
| </s:schema>
| </wsdl:types>
| <wsdl:message name="UpdateUserSoapIn">
| <wsdl:part name="parameters" element="tns:UpdateUser" />
| </wsdl:message>
| <wsdl:message name="UpdateUserSoapOut">
| <wsdl:part name="parameters" element="tns:UpdateUserResponse" />
| </wsdl:message>
| <wsdl:message name="DeleteUserSoapIn">
| <wsdl:part name="parameters" element="tns:DeleteUser" />
| </wsdl:message>
| <wsdl:message name="DeleteUserSoapOut">
| <wsdl:part name="parameters" element="tns:DeleteUserResponse" />
| </wsdl:message>
| <wsdl:message name="GetUserListSoapIn">
| <wsdl:part name="parameters" element="tns:GetUserList" />
| </wsdl:message>
| <wsdl:message name="GetUserListSoapOut">
| <wsdl:part name="parameters" element="tns:GetUserListResponse" />
| </wsdl:message>
| <wsdl:portType name="UserManagementSoap">
| <wsdl:operation name="UpdateUser">
| <wsdl:input message="tns:UpdateUserSoapIn" />
| <wsdl:output message="tns:UpdateUserSoapOut" />
| </wsdl:operation>
| <wsdl:operation name="DeleteUser">
| <wsdl:input message="tns:DeleteUserSoapIn" />
| <wsdl:output message="tns:DeleteUserSoapOut" />
| </wsdl:operation>
| <wsdl:operation name="GetUserList">
| <wsdl:input message="tns:GetUserListSoapIn" />
| <wsdl:output message="tns:GetUserListSoapOut" />
| </wsdl:operation>
| </wsdl:portType>
| <wsdl:binding name="UserManagementSoap" type="tns:UserManagementSoap">
| <soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
| <wsdl:operation name="UpdateUser">
| <soap:operation soapAction="http://somewebsite.net/UpdateUser" style="document" />
| <wsdl:input>
| <soap:body use="literal" />
| </wsdl:input>
| <wsdl:output>
| <soap:body use="literal" />
| </wsdl:output>
| </wsdl:operation>
| <wsdl:operation name="DeleteUser">
| <soap:operation soapAction="http://somewebsite.net/DeleteUser" style="document" />
| <wsdl:input>
| <soap:body use="literal" />
| </wsdl:input>
| <wsdl:output>
| <soap:body use="literal" />
| </wsdl:output>
| </wsdl:operation>
| <wsdl:operation name="GetUserList">
| <soap:operation soapAction="http://somewebsite.net/GetUserList" 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="UserManagementSoap12" type="tns:UserManagementSoap">
| <soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
| <wsdl:operation name="UpdateUser">
| <soap12:operation soapAction="http://somewebsite.net/UpdateUser" style="document" />
| <wsdl:input>
| <soap12:body use="literal" />
| </wsdl:input>
| <wsdl:output>
| <soap12:body use="literal" />
| </wsdl:output>
| </wsdl:operation>
| <wsdl:operation name="DeleteUser">
| <soap12:operation soapAction="http://somewebsite.net/DeleteUser" style="document" />
| <wsdl:input>
| <soap12:body use="literal" />
| </wsdl:input>
| <wsdl:output>
| <soap12:body use="literal" />
| </wsdl:output>
| </wsdl:operation>
| <wsdl:operation name="GetUserList">
| <soap12:operation soapAction="http://somewebsite.net/GetUserList" 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="UserManagement">
| <wsdl:port name="UserManagementSoap" binding="tns:UserManagementSoap">
| <soap:address location="http://someurl/someservice.asmx" />
| </wsdl:port>
| <wsdl:port name="UserManagementSoap12" binding="tns:UserManagementSoap12">
| <soap12:address location="http://someurl/someservice.asmx" />
| </wsdl:port>
| </wsdl:service>
| </wsdl:definitions>
Here is the stack trace I am getting:
| org.jboss.ws.metadata.wsdl.WSDLException: java.net.ConnectException: Connection
| timed out: connect
| at org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory.getDocument(WSDLDef
| initionsFactory.java:198)
| at org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory.parse(WSDLDefinitio
| nsFactory.java:106)
| at org.jboss.ws.metadata.ServiceMetaData.getWsdlDefinitions(ServiceMetaD
| ata.java:273)
| at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR
| 109ClientMetaDataBuilder.java:110)
| at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR
| 109ClientMetaDataBuilder.java:82)
| at org.jboss.ws.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:96)
| at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryIm
| pl.java:157)
| at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryIm
| pl.java:142)
| at somewebsite.Test.call(Test.java:26)
| at somewebsite.Test.main(Test.java:14)
| Caused by: java.net.ConnectException: Connection timed out: connect
| at java.net.PlainSocketImpl.socketConnect(Native Method)
| at java.net.PlainSocketImpl.doConnect(Unknown Source)
| at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
| at java.net.PlainSocketImpl.connect(Unknown Source)
| at java.net.Socket.connect(Unknown Source)
| at java.net.Socket.connect(Unknown Source)
| at sun.net.NetworkClient.doConnect(Unknown Source)
| at sun.net.www.http.HttpClient.openServer(Unknown Source)
| at sun.net.www.http.HttpClient.openServer(Unknown Source)
| at sun.net.www.http.HttpClient.<init>(Unknown Source)
| at sun.net.www.http.HttpClient.New(Unknown Source)
| at sun.net.www.http.HttpClient.New(Unknown Source)
| at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown
| Source)
| at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Sour
| ce)
| at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
| at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown So
| urce)
| at java.net.URL.openStream(Unknown Source)
| at org.jboss.ws.metadata.wsdl.WSDLDefinitionsFactory.getDocument(WSDLDef
| initionsFactory.java:181)
| ... 9 more
|
Let me know if I am doing anything completely wrong? I didn't find any helpful example / issues in forums / wiki / jbossws guide to consume a .net service.
Thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3973048#3973048
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3973048
19 years, 7 months