启动一个新项目,并想了解在WAR与EAR中打包EJB的优缺点.
当EJB在WAR中时,JNDI仍然可以工作吗?效率?等等.?
谢谢.
我正在尝试使用Lists.UpdateListItems Web服务更新SharePoint托管元数据(MMD)字段,但它无法正常工作.
这是我的SOAP请求
<?xml version="1.0" ?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<UpdateListItems xmlns="http://schemas.microsoft.com/sharepoint/soap/">
<listName>My Test List</listName>
<updates>
<Batch ListVersion="0" PreCalc="TRUE" OnError="Continue">
<Method Cmd="Update" ID="1">
<Field Name="ID">3</Field>
<Field Name="Document_x0020_Title">foo</Field>
<Field Name="Fiscal_x0020_Year1">13;#FY 2006|7e8205da-57a1-45a3-8147-469b795ad6e8</Field>
</Method>
</Batch>
</updates>
</UpdateListItems>
</S:Body></S:Envelope>
Run Code Online (Sandbox Code Playgroud)
此请求将成功更新"文档标题"(文本字段),但MMD字段"会计年度"未更改,并且Web服务未返回任何错误.
请注意,MMD的值采用"WssId; #TermValue | TermGuid"格式,并且已为该站点创建术语.
请帮忙.
例如,假设我有以下数据库表
Building
-----------
id
name
Run Code Online (Sandbox Code Playgroud)
和
Room
-----------
id
roomNo
buildingId
Run Code Online (Sandbox Code Playgroud)
构建Java类看起来像
@Entity
public class Building {
private int id;
@OneToMany private List<Room> rooms;
...
Run Code Online (Sandbox Code Playgroud)
我有以下SQL来获取Building
SELECT b.id,
b.name,
r.id AS rid,
r.roomNo
FROM Building b
LEFT JOIN Room r ON
b.id = r.buildingId
Run Code Online (Sandbox Code Playgroud)
结果将是
id, name, rid, roomNo
---------------------
1, 'b1', 10, 'r100'
1, 'b1', 11, 'r101'
2, 'b2', 12, 'r10'
Run Code Online (Sandbox Code Playgroud)
请注意,由于一对多关系,存在重复的建筑物.
我知道我只需使用JPQL即可获得Building实体,但我希望使用本机SQL执行此操作.那么我如何使用JPA的@SqlResultSetMapping将上面的结果映射回到Building类?
我试图从ManifoldCF连接到FileNet而没有任何成功.我得到的错误是
Connection status: Connection temporarily failed: Connection refused to host: 127.0.0.1; nested exception is: java.net.ConnectException: Connection refused: connect
Run Code Online (Sandbox Code Playgroud)
我的参数摘要如下.请注意,我将*放在我不确定的参数旁边,服务器名称和用户名都是虚构的
FileNet domain=test-my-filenet-domain *
User ID=myusername
Server protocol=http
Server WebServices location=wsi/FNCEWS40DIME *
Object store=Test OS
Document URL protocol=http
Document URL hostname=samplehost.mycomp.org
Document URL location=Workplace/Browse.jsp
Server port=7003
Server hostname=samplehost-wp.mycomp.org
Document URL port=443
Password=********
Run Code Online (Sandbox Code Playgroud)
我已经验证了FileNet CE ping页面已启动并在URL上运行http://samplehost.mycomp.org:7003/FileNet/Engine
这个经典的Workplace可以在https://samplehost-wp.mycomp.org/Workplace上找到.请注意,Workplace通过HTTPS,CE通过HTTP
有没有人使用Apache Manifold成功连接到FileNet仓库?
在J2EE 6中,您可以将EJB会话bean公开为REST Web服务,如下所示
@Stateless
@Path("/test")
public class TestSessionBean {
@GET
@Produces("application/xml")
public String getTest() {
return "<?xml version='1.0' encoding='UTF-8'?><val>test session bean</val>";
}
}
Run Code Online (Sandbox Code Playgroud)
当我在.war中打包EJB时,这是有效的,但是,当我尝试将项目打包到EAR中的单独的web和ejb模块时,我得到一个HTML 404 not found错误.
有人可以解释一下吗?
我正在使用Glassfish v3
这是我的web.xml
<servlet>
<servlet-name>TaskRestService</servlet-name>
<servlet-class>com.sun.jersey.spi.container.servlet.ServletContainer</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>TaskRestService</servlet-name>
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
Run Code Online (Sandbox Code Playgroud) 这个SOAP请求有什么问题?我继续得到400错误的请求错误.
<S:Body>
<GetTermSets xmlns="http://schemas.microsoft.com/sharepoint/taxonomy/soap/">
<sharedServiceIds>
<termStoreIds>
<termStoreId>27a0a321-083f-4688-8b6e-d86b7ab42de9</termStoreId>
</termStoreIds>
</sharedServiceIds>
<termSetIds>
<termSetIds><termSetId>cb1b9444-159d-48c3-b9a7-19ebd612e796</termSetId></termSetIds>
</termSetIds>
<lcid>1033</lcid>
<clientTimeStamps>
<timeStamps><timeStamp>2304823424</timeStamp></timeStamps>
</clientTimeStamps>
<clientVersions><versions><version>1</version></versions></clientVersions>
</GetTermSets>
</S:Body>
Run Code Online (Sandbox Code Playgroud)